Commit Graph

2048 Commits

Author SHA1 Message Date
Lachlan Roberts 86ea115e1f Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-06-04 09:27:43 +10:00
Lachlan Roberts 38f56f5973 make some test methods public to fix build
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-06-04 09:26:35 +10:00
Joakim Erdfelt 0cce039e7c
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-06-03 16:10:41 -05:00
Ludovic Orban e43c98f08d Signed-off-by: Ludovic Orban <lorban@bitronix.be> 2020-06-03 17:58:01 +02:00
Ludovic Orban 6c62157865 Signed-off-by: Ludovic Orban <lorban@bitronix.be> 2020-06-03 16:30:26 +02:00
Lachlan Roberts 286ee6868a Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-06-03 12:36:10 +10:00
Lachlan f671cf6512
Merge pull request #4884 from lorban/jetty-9.4.x-4877-pathSpec
Refactor PathSpec and fix javax.websocket URI Template matching
2020-06-03 11:50:09 +10:00
Joakim Erdfelt 5d6f3e2ddc Updating to version 9.4.30-SNAPSHOT 2020-05-21 13:42:25 -05:00
Joakim Erdfelt 77c232aed8 Updating to version 9.4.29.v20200521 2020-05-21 12:04:14 -05:00
Ludovic Orban e0391a5ea8 replace LogicalDeclarationComparator with Comparator.comparing
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-05-20 17:06:17 +02:00
Joakim Erdfelt 5c2f00c1f5 Issue #4776 - Adding different length tests to WebSocketUriMappingTest
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-05-20 17:05:18 +02:00
Joakim Erdfelt 0234ead671 Issue #4776 - Making PathMappings._mappings use LogicalDeclaration sort
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-05-20 17:05:18 +02:00
Joakim Erdfelt 79e76544ff Issue #4776 - UriTemplatePathSpec sorting on simplified path spec.
+ Moved testcase to jetty-http (better place for it)
+ Introduced simplified path spec to aid in sorting
+ Made .getMatches(String) return sorted list by best match.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-05-20 17:05:18 +02:00
Ludovic Orban 85a5452f49 Issue #4877 - refactor PathSpec into an interface whose implementations use final fields
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-05-20 17:03:07 +02:00
Joakim Erdfelt 822d98b023
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-05-11 21:16:59 -05:00
Joakim Erdfelt d127db5186
Merge branch 'jetty-9.4.x-4860-NullHttpFields' of github.com:eclipse/jetty.project into jetty-9.4.x-4860-NullHttpFields 2020-05-11 17:26:05 -05:00
Joakim Erdfelt 4dc024b2b1
Issue #4860 - Fixing test comment
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-05-11 17:25:49 -05:00
Greg Wilkins 59a66158ed Issue #4860 NPE HttpFields
Fixes from review.
Fixed iterator overflow bug
clearer updates of size
better nonNull messages

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-05-11 22:09:19 +02:00
Joakim Erdfelt 6ae75be9bc
Issue #4860 - Consistency to HttpFields API
If a null name (or HttpHeader or HttpField) is used
it should throw an ISE

+ .add() should remain consistent
+ .put() should remain consistent

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-05-11 10:34:52 -05:00
Joakim Erdfelt 90da10dac5
Issue #4860 - Improving testPreventNullField testcase
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-05-11 10:05:56 -05:00
Joakim Erdfelt 2c7c98f469
Eliminate warnings
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-05-11 10:03:12 -05:00
Greg Wilkins 1ac7fe4f9c Issue #4860 NPE from HttpFields
+ Fix bug with list iterator nextIndex
 + List iterator cannot inject null fields
 + minor cleanups

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-05-11 14:00:04 +02:00
Greg Wilkins 6af6af6419 Issue #4860 NPE from HttpFields
Improved test coverage

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-05-11 13:58:27 +02:00
Greg Wilkins 8c7e34f37d
Jetty 10.0.x immutable meta data (#4777)
Made HttpURI, HttpFields and MetaData immutable.  The first two follow the same builder pattern and MetaData is constructor injection only.

* Immutable version of HttpFields

Preserve API and usage of HttpFields class while providing a read only interface and immutable implementation.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable version of HttpFields

Use an ArrayList in HttpFields. While slightly slower than the array, it will mostly be used as a builder pattern for an Immutable

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable version of HttpFields

Fixed exception type.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable version of HttpFields

asImmutable method

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

Made HttpURIU immutable with a builder pattern.
MetaData immutable and working within http module.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

Fixes from review

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

Passing tests upto and including jetty-server

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

Cleanup of HttpURI.Builder API as suggested in PR.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

Added builder for MetaData.Request

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

more api fixes

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

WIP making HttpFiels itself immutable.  Currently working up to jetty-servlet.

Need to consider if content-length really is meta data and how much and when can we trust it.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

WIP

Need to consider if content-length really is meta data and how much and when can we trust it. Also need to consider difference between h2 and h1 authority in metadata.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

jetty-client and jetty-servlet passing tests.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

Better align the style of immutability between `HttpFields` and `HttpURI`.
They both now have static build() and from() methods, plus Builder and Immutable implementations.
Potentially `Builder` could be renamed as `Mutable`

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

http2-server tests passed

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

http2-client tests passed

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

cleann build?

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

fix

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

more test fixes

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

Cleanups, mostly using EMPTY when appropriate.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

Cleanups, use immutable

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

No trailers for connect

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

Fix CONNECT path handling

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

fixed rewrite query handling

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

rename Builders to Muttables

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

misc cleanups

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

Revert to using arrays due to garbage generated by streams and iterators (12% of a simple benchmark!).
Even if this garbage is an artifact of the JIT being disabled by observation, it can hide other allocations, so best to just use simple arrays!

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

More optimizations and better test coverage.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable Metadata

various cleanups

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

More optimizations

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

review changes

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

changes after review:
 + less usage of Mutable
 + more usage of EMPTY
 + restored fragment handling

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

changes after review:
 + less usage of Mutable
 + less usage of asImmutable

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

changes after review:
 + less usage of Mutable

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

changes after review:
 + better handling of URI in ContextHandler

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

changes after review:
 + downcast in test to access mutable response headers.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

changes after review:
 + use put instead of add for one time headers

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* private

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-04-28 13:36:44 +02:00
Simone Bordet da651e995f Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-04-14 23:37:26 +02:00
Simone Bordet 3e96bf8621 Merged branch 'jetty-9.4.x' into 'jetty-9.4.x-4764-http2_content_length'. 2020-04-14 11:45:48 +02:00
Simone Bordet 2e85b3e169 Fixes #4764 - HTTP2 Jetty Server does not send back content-length.
Updates after review.
Now the Content-Length header is generated by HpackEncoder based on
MetaData.contentLength, so that the MetaData.HttpFields are not modified.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-04-14 11:44:58 +02:00
Joakim Erdfelt 5699b9ff3d Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
Joakim Erdfelt ab228fde9e Updating to version 9.4.28.v20200408 2020-04-08 12:33:56 -05:00
Jan Bartel bfc9738f86
Issue #4760 Response.setLocale should override previous (#4761)
Signed-off-by: Jan Bartel <janb@webtide.com>
2020-04-08 17:28:14 +02:00
Greg Wilkins 4837fe1c86 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-03-30 16:41:05 +02:00
Greg Wilkins e913e7970f
Fixes #4542 Root pathspec mapping pathInfo (#4705)
* Fixes #4542 Root pathspec mapping pathInfo

For the "" root pathspec, the pathinfo should always be the full path and the matched path is ""

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* updates from review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-03-30 16:38:42 +02:00
Greg Wilkins e3d670d61d
Issue #4713 Async dispatch with query. (#4721)
* Issue #4713 Async dispatch with query.

+ Preserve the entire URI with query when startAsync(req,res) is used.
+ merge any query string from dispatch path with either original query or preserved query from forward

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4713 asyncDispatch with query parameters

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-03-30 16:23:26 +02:00
Lachlan af899b0e68
Merge pull request #4602 from eclipse/jetty-10.0.x-4340-ServiceLoader
Issue #4340 - Continue after ServiceLoader ServiceConfigurationError
2020-03-25 10:30:38 +11:00
Joakim Erdfelt 43419802b7
Issue #4685 - Declare <scope> for jetty-slf4j-impl everywhere
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-03-20 11:12:08 -05:00
Joakim Erdfelt 9492a5379c
Issue #4685 - eliminate <version> in jetty-slf4j-impl
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-03-20 10:42:36 -05:00
Lachlan Roberts 04cecaaaef Issue #4340 - Change usages to more closely follow previous behaviours
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-03-20 17:02:49 +11:00
Joakim Erdfelt a16abe1693
Issue #4685 - jetty-slf4j-impl not a compile/runtime dependency.
+ Mark as a test dependency

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-03-19 17:46:41 -05:00
Lachlan Roberts c658ae7056 Issue #4673 - fix MultiPart parsing for content split in boundary
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-03-18 11:22:40 +11:00
Lachlan Roberts 30d36ed68c Merge branch jetty-10.0.x into jetty-10.0.x-4340-ServiceLoader
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-03-17 15:00:30 +11:00
Joakim Erdfelt 57604d0955
Issue #4572 - Mechanical Change to use org.slf4j
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-03-16 15:48:25 -05:00
Joakim Erdfelt 8b7e64915f
Issue #4572 - Replace Jetty Logging with SLF4J
* Introducing jetty-slf4j-impl
* Make Jetty use org.slf4j
* Removed most of org.eclipse.jetty.util.log classes
* Left org.eclipse.jetty.util.log.Log and
       org.eclipse.jetty.util.log.Logger but as
  simple bridge classes that are deprecated
* Migrated code using org.eclipse.jetty.util.log.StacklessLogging
  to org.eclipse.jetty.logging.StacklessLogging found in
  the jetty-slf4j-impl
* Moved logging start modules from jetty-util to jetty-home
* Simplified logging start modules
* Updated code that was using StdErrLog directly
* Updating module-info.java for org.slf4j
* removing org.eclipse.jetty.util.log.class references
* jetty-start supports manually declared default provider
  + and we use it to default "logging" to the "logging-jetty" provider
* Cleaning up jetty-maven-plugin and IT testing for Logging
* Using old slf4j for it testing
* Updating compiler config to show Xlint:exports warnings
* Updating console-capture and logging-noop
* Adding slf4j bridge (capture) jetty modules
* Updates to jetty logging module locations
* Changing reference to slf4j dependent mod
* Process requested enabled modules in topological order
* Limiting inclusions in shaded jetty-start
  + Also adding note to jetty-util classes that are used by
    jetty-start
* Default logging level on baseline logging config is INFO (not DEBUG)
* Changing from system to server classes in logging
* Updating other modules to use new logging names

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-03-16 11:21:54 -05:00
Lachlan Roberts 7af220dade Issue #4340 - shortcut method for the serviceStream
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-03-16 09:42:32 +11:00
Lachlan Roberts edd671146d Issue #4340 - ServiceLoader stream which doesn't break if hasNext throws
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-03-13 16:59:33 +11:00
Lachlan Roberts 355d21317b Issue #4340 - Changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-03-02 10:16:38 +11:00
Lachlan Roberts 97c55e27cc Issue #4340 - remove TypeUtil.load and use flatMap() on streams instead
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-02-29 11:06:32 +11:00
Lachlan Roberts 6832912d49 Issue #4340 - Implement TypeUtil.load(ServiceLoader) with Streams
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-02-28 12:15:27 +11:00
Joakim Erdfelt 8aabb52557 Updating to version 9.4.28-SNAPSHOT 2020-02-27 13:03:44 -06:00
Joakim Erdfelt a304fd9f35 Updating to version 9.4.27.v20200227 2020-02-27 12:21:57 -06:00
Lachlan Roberts a277c30b81 Issue #4340 - Move ServiceLoaderUtil.load method to TypeUtil.loadAll
- increase MAX_ERRORS to 1000
- introduce a loadFirst method

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-02-26 10:26:29 +11:00
Lachlan Roberts a7f4d2606b Issue #4340 - always pass in ServiceLoader to ServiceLoaderUtil
this prevents errors where jetty-util must declare it uses the provider
class in module.info

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-02-25 19:49:23 +11:00
Lachlan Roberts 81424f1f44 Issue #4340 - Continuing after ServiceLoader ServiceConfigurationError
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-02-25 19:49:22 +11:00
Simone Bordet 0fc12b0681 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-02-20 11:23:49 +01:00
Simone Bordet 2958cb1d62
Merge pull request #4544 from eclipse/jetty-9.4.x-4541-OptimalLargeResponseHeader
Issue #4541 Large response header
2020-02-20 11:17:39 +01:00
Lachlan Roberts 55748f12c2 Issue #4581 - remove unnecessary javadoc on Override methods
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-02-18 11:33:56 +11:00
Simone Bordet 01438e6f91 Code cleanup.
Changed the way the test directory was created: it was based on a
millisecond timestamp, but the tests run fast and it was possible that
two tests were creating the directory within the same millisecond.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-02-17 17:32:51 +01:00
Greg Wilkins f50c2654b9 Fixes #4541 Large Headers
Added a HEADER_OVERFLOW result as per review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-02-06 21:17:58 +01:00
Greg Wilkins 1b59e42294 Issue #4541 Large response header
Fix #4541 by initially allocated a header buffer of `min(_config.getResponseHeaderSize(), _config.getOutputBufferSize())`
Only allocate a buffer of `getResponseHeaderSize` if an overflow results.

This should have no effect on the majority of responses where `getOutputBufferSize` is greater than `getResponseHeaderSize` other than the cost of a min operation.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-02-05 10:29:41 +01:00
Simone Bordet ce6e146ac1
Merge pull request #4489 from eclipse/jetty-10.0.x-2643-pkcs12_keystores
Fixes #2643 - Switch SslContextFactory.keystoreType from JKS to PKCS12.
2020-01-30 19:28:49 +01:00
Simone Bordet 7592d36c4b Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-01-30 10:41:43 +01:00
Jan Bartel 45771dbd26 Fix bad merge 2020-01-29 12:08:13 +01:00
Jan Bartel 79a337567f Issue #4247 use context default for samesite cookie attribute (#4512)
* Issue #4247 use context default for samesite cookie attribute

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-01-29 11:54:43 +01:00
Jan Bartel 9850c29839
Issue #4247 use context default for samesite cookie attribute (#4512)
* Issue #4247 use context default for samesite cookie attribute

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-01-29 11:05:35 +01:00
Joakim Erdfelt 56fc476d55 Updating to version 9.4.27-SNAPSHOT 2020-01-17 07:00:10 -06:00
Joakim Erdfelt 7b38981d25 Updating to version 9.4.26.v20200117 2020-01-17 06:21:47 -06:00
Simone Bordet d60b4459bf Fixes #2643 - Switch SslContextFactory.keystoreType from JKS to PKCS12.
Updated old keystores to new PKCS12 keystores.
Removed unused keystores and truststores.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-01-17 09:48:51 +01:00
Joakim Erdfelt eba24b6b83
Issue #4383 - Updates behavior to eliminate ISE
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-01-15 15:48:51 -06:00
Joakim Erdfelt 37f8503442
Issue #4383 - Minimal NPE prevention on MultiPart
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-01-15 15:31:43 -06:00
Joakim Erdfelt 01a5974f4b
Merge branch `jetty-9.4.x` into `jetty-10.0.x`
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

# Conflicts:
#	Jenkinsfile
#	examples/async-rest/async-rest-webapp/src/test/java/org/eclipse/jetty/example/asyncrest/DemoServer.java
#	jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTest.java
#	jetty-http/src/test/java/org/eclipse/jetty/http/HttpParserTest.java
#	jetty-http/src/test/java/org/eclipse/jetty/http/HttpTester.java
#	jetty-http/src/test/java/org/eclipse/jetty/http/MultiPartParserTest.java
#	jetty-http/src/test/java/org/eclipse/jetty/http/PathMapTest.java
#	jetty-http/src/test/java/org/eclipse/jetty/http/matchers/HttpFieldsMatchersTest.java
#	jetty-maven-plugin/src/test/java/org/eclipse/jetty/maven/plugin/it/TestGetContent.java
#	jetty-server/src/test/java/org/eclipse/jetty/server/CookieCutterLenientTest.java
#	jetty-server/src/test/java/org/eclipse/jetty/server/CookieCutterTest.java
#	jetty-server/src/test/java/org/eclipse/jetty/server/PartialRFC2616Test.java
#	jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ServletLifeCycleTest.java
#	jetty-servlets/src/test/java/org/eclipse/jetty/server/handler/gzip/GzipContentLengthTest.java
#	jetty-servlets/src/test/java/org/eclipse/jetty/server/handler/gzip/GzipDefaultNoRecompressTest.java
#	jetty-servlets/src/test/java/org/eclipse/jetty/servlets/MultipartFilterTest.java
#	jetty-unixsocket/src/test/java/org/eclipse/jetty/unixsocket/UnixSocketClient.java
#	jetty-util/src/test/java/org/eclipse/jetty/util/B64CodeTest.java
#	jetty-util/src/test/java/org/eclipse/jetty/util/resource/FileSystemResourceTest.java
#	jetty-util/src/test/java/org/eclipse/jetty/util/ssl/X509Test.java
#	jetty-webapp/src/test/java/org/eclipse/jetty/webapp/ClasspathPatternTest.java
#	jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/LargeMessageTest.java
#	jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/ClientAnnotatedEndpointScannerGoodSignaturesTest.java
#	jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/ClientAnnotatedEndpointScannerInvalidSignaturesTest.java
#	jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/metadata/EncoderMetadataSetTest.java
#	jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/utils/ReflectUtilsTest.java
#	jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/ConfiguratorTest.java
#	jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/DelayedStartClientOnServerTest.java
#	jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/RestartContextTest.java
#	jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/ServerAnnotatedEndpointScannerGoodSignaturesTest.java
#	jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/ServerAnnotatedEndpointScannerInvalidSignaturesTest.java
#	jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/SessionTest.java
#	jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/ErrorCloseTest.java
#	jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/client/ClientConnectTest.java
#	jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/client/ClientSessionsTest.java
#	jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/client/WebSocketClientTest.java
#	jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/server/PartialListenerTest.java
#	jetty-websocket/websocket-api/src/test/java/org/eclipse/jetty/websocket/api/extensions/ExtensionConfigTest.java
#	jetty-websocket/websocket-api/src/test/java/org/eclipse/jetty/websocket/api/util/QuoteUtilQuoteTest.java
#	jetty-websocket/websocket-api/src/test/java/org/eclipse/jetty/websocket/api/util/QuoteUtilTest.java
#	jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/ConnectionManagerTest.java
#	jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/TomcatServerQuirksTest.java
#	jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/WebSocketClientInitTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/GeneratorTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ParserTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/TextPayloadParserTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ab/TestABCase11.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ab/TestABCase12.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ab/TestABCase2.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ab/TestABCase4.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ab/TestABCase73.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/events/EventDriverTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/events/JettyAnnotatedScannerTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/ByteAccumulatorTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/DeflateFrameExtensionTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/PerMessageDeflateExtensionTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/io/ConnectionStateTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/io/http/HttpResponseHeaderParserTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/message/MessageDebug.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/message/Utf8CharBufferTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/test/UnitGenerator.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/util/Utf8PartialBuilderTest.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/RedirectWebSocketClientTest.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/SimpleServletServer.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase1.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase2.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase3.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase4.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase5.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase6.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase6BadUTF.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase6GoodUTF.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase7.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase7BadStatusCodes.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase7GoodStatusCodes.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase9.java
#	pom.xml
#	tests/test-continuation/src/test/java/org/eclipse/jetty/continuation/ContinuationsTest.java
#	tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/JdbcTestHelper.java
#	tests/test-webapps/test-jetty-webapp/src/test/java/org/eclipse/jetty/TestServer.java
#	tests/test-webapps/test-proxy-webapp/src/test/java/org/eclipse/jetty/TestTransparentProxyServer.java
2020-01-15 12:20:20 -06:00
Joakim Erdfelt 8c65309963
Addressing Checkstyle violations in src/test/java
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-01-14 12:33:34 -06:00
Joakim Erdfelt f4fc78ac66
Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-3578-epl2 2020-01-09 15:59:36 -06:00
Joakim Erdfelt 1f8ad08281
Fixing Checkstyle violations
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-01-09 15:56:06 -06:00
Simone Bordet 5f82e17d2f Issue #3578 - Adopt EPL-2.0 for Jetty-10.
WIP: updated copyright headers for Java files.

TODO: doc files and META-INF files inside jars.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-01-09 20:10:19 +01:00
Simone Bordet 4e2c3f1447 Fixes #4459 - Move multipart classes to jetty-server.
Moved multipart classes to jetty-server.
Updated jetty-http's pom.xml and module-info.java
removing the dependency on Servlet APIs.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-01-09 16:23:05 +01:00
Simone Bordet a5c99207fc Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-01-07 17:02:40 +01:00
Simone Bordet 923ec38adf Merged branch 'jetty-9.3.x' into 'jetty-9.4.x'. 2020-01-07 16:51:25 +01:00
Simone Bordet e3c8546667 Merged branch 'jetty-9.2.x' into 'jetty-9.3.x'. 2020-01-07 16:35:05 +01:00
Simone Bordet de890bb1b7 Happy New Year 2020.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-01-07 16:25:32 +01:00
Joakim Erdfelt f4e7e4c3db Merge branch 'release-9.4.25' into jetty-9.4.x 2020-01-03 12:49:27 -06:00
olivier lamy ff48fba585 happy new year
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-01-02 21:59:21 +01:00
olivier lamy e1371a1c13 happy new year
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-01-02 21:54:05 +01:00
Joakim Erdfelt 8974176c4b Updating to version 9.4.26-SNAPSHOT 2019-12-20 11:30:41 -06:00
Joakim Erdfelt a9729c7e7f Updating to version 9.4.25.v20191220 2019-12-20 10:46:56 -06:00
Simone Bordet e3bb5a7515 Issue #4225 - Fix JPMS transitivity.
Reworked all module-info.java files to take into
account JPMS transitivity.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-12-19 18:17:35 +01:00
Joakim Erdfelt 2c464e36a2
Merge branch 'jetty-9.4.x' into jetty-10.0.x 2019-12-12 14:11:51 -06:00
Joakim Erdfelt 36d06d016d
Issue #4415 - Addressing Gzip Decoding of large files
+ Addressing PR review

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-12-12 13:23:44 -06:00
Joakim Erdfelt 1e810d370f
Issue #4415 - Addressing Gzip Decoding of large files
+ Addressing PR review

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-12-12 11:58:44 -06:00
Joakim Erdfelt 2b58379f88
Issue #4415 - Addressing Gzip Decoding of large files
+ Now applying proper RFC 1952 ISIZE check.
+ Bit shifting is done with Longs against Long value.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-12-11 14:38:42 -06:00
Simone Bordet 3b817821e7
Merge pull request #3740 from eclipse/jetty-10.0.x-3537-bootstrap_websocket_http2
Issue #3537 - Bootstrap websocket on HTTP/2
2019-11-28 15:47:26 +01:00
Joakim Erdfelt 4af28579f0
Merge branch 'jetty-9.4.x' into jetty-10.0.x 2019-11-27 05:52:44 -06:00
Joakim Erdfelt 380cebc3bb
Merge pull request #4337 from eclipse/jetty-9.4.x-4329-rewrite-rules-demobase
Issue #4329 - Fixing RuleContainer to handle path parameters
2019-11-27 05:52:15 -06:00
Joakim Erdfelt 0f7a3b2d91 Updating to version 9.4.25-SNAPSHOT 2019-11-20 16:08:38 -06:00
Joakim Erdfelt 363d5f2df3 Updating to version 9.4.24.v20191120 2019-11-20 15:25:01 -06:00
Joakim Erdfelt 09641c9581
Issue #4329 - Fixing RuleContainer to handle path parameters
+ Introducing HttpURI.setParam(String)
+ Updating DemoBaseTest.testSessionDump() to follow expected behavior

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-11-20 14:09:44 -06:00
Joakim Erdfelt 453d41940b Updating to version 9.4.24-SNAPSHOT 2019-11-18 13:52:51 -06:00
Joakim Erdfelt abbccc65d6 Updating to version 9.4.23.v20191118 2019-11-18 13:09:44 -06:00
Simone Bordet 06ce13e226 Merged branch 'jetty-10.0.x' into 'jetty-10.0.x-3537-bootstrap_websocket_http2'. 2019-11-14 12:42:15 +01:00
Greg Wilkins 8fef35c573 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-11-14 13:30:23 +11:00
Greg Wilkins 32931fac7b
Issue #4247 SameSite Session Cookie (#4271)
* Issue #4247 SameSite Session Cookie

Allows sameSite cookie settings to be configured in SessionCookieConfig comments

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4247 SameSite Session Cookies

Use non versioned cookie

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4247 SameSite Session Cookies

Added test and fixed getCommentWithAttributes

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4247 - Updating unit tests for HttpCookie

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

* Issue #4247 SameSite Session Cookie

While it may be best practise to always use Secure cookies when SameSite is None, there is nothing in the RFC that mandates it and thus I don't believe we should prevent such a configuration.  If browsers enforce this, then users will find out soon enough... and if browsers change, then we are not required to do a new release to match.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4247 SameSite Session Cookie

For cookie comments with multiple SameSite attributes, the most strict
value is used. So `Strict` has precedence over `Lax` which has
precedence over `None`.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-11-14 11:56:40 +11:00
Simone Bordet d22f5b1d9d Issue #4282 - Review HttpParser handling in case of no content.
Removed TODOs.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-11-12 17:02:05 +01:00
Simone Bordet 5f9edb1361 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-11-12 16:41:33 +01:00
Simone Bordet b1d231b9e7 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-11-11 16:45:12 +01:00
Greg Wilkins ca72a8fd71 Issue #4282 HttpParser no content
Added HTTP/0.9 test

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-11-11 17:27:56 +11:00
Greg Wilkins 3fd1daa5c8 Merge branch 'jetty-9.4.x' into jetty-9.4.x-4282-review_httpparser_nocontent 2019-11-11 17:15:13 +11:00
Simone Bordet 47447b5cf5 Issue #4282 - Review HttpParser handling in case of no content.
Fixed handling of returning true from headerComplete() and
contentComplete().

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-11-11 01:13:13 +01:00
Lachlan c336616c96
Issue #2709 - reduce default headerCacheSize to 1024 (#4292)
make headerCacheSize on HttpReceiverOverHTTP configurable

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-11-08 21:57:49 +11:00
Simone Bordet 1b0e252a83 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-11-08 09:59:51 +01:00
Simone Bordet 1d8a2fe03a Code cleanup.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-11-08 09:56:36 +01:00
Simone Bordet 1ea9108141 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-11-08 08:59:27 +01:00
Simone Bordet e37524c8a7 Code cleanup.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-11-08 08:54:49 +01:00
Joakim Erdfelt 43d95cd984 Updating to version 9.3.29-SNAPSHOT 2019-11-05 13:02:10 -06:00
Joakim Erdfelt d7dd68d6e9 Updating to version 9.3.28.v20191105 2019-11-05 11:46:40 -06:00
Joakim Erdfelt b17439c731 Updating to version 9.2.30-SNAPSHOT 2019-11-05 11:23:21 -06:00
Joakim Erdfelt 36c95fdd43 Updating to version 9.2.29.v20191105 2019-11-05 10:43:15 -06:00
Joakim Erdfelt 1ed13b6b30 Updating to version 9.4.23-SNAPSHOT 2019-10-22 09:19:41 -05:00
Joakim Erdfelt b1e6b55512 Updating to version 9.4.22.v20191022 2019-10-22 08:20:50 -05:00
Simone Bordet 61b2f9870b Code cleanups.
Made Violation public since it's used in method signatures.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-20 17:21:14 +02:00
Greg Wilkins 203eef4029 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-10-19 10:29:01 +11:00
Joakim Erdfelt 890c0b26cb Fixes #4203 and #4204 - Transfer-Encoding + Content-Length behaviors (#4205)
* Issue #4203 - Updating test to verify report on Transfer-Encoding

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

* Fixes #4203 - Transfer-Encoding + Content-Length is 400 Bad Request

+ Fixing validation to not be header order dependent.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

* Issue #4203 - Fixing hasTransferEncoding reset and testcase assumption

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

* Issue #4204 - Transfer-Encoding RFC7230 behaviors

+ More test cases and implementation.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

* Issue #4204 - Transfer-Encoding RFC7230 behaviors

+ Adjusting HttpParser to handle the case where we have multiple
  Transfer-Encoding headers and none declare the 'chunked' token.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

* Issue #4204 - Transfer-Encoding RFC7230 behaviors

+ Making changes from PR review

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

* Issue #4203 Transfer Encoding

request with TE and no chunking is a Bad Request

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-10-19 08:05:15 +11:00
Greg Wilkins 894fc9b115
Issue #4208 - Content-Length in 304 (#4211)
* Issue #4208 Content-Length in 304

Added tests for RFC7230 section 3.3.2 for 304 and HEAD responses with content length.
Fixed HttpGenerator to set content-length in 304 response
Fixed insufficient content written check for 304

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4208 Content-Length in 304

Use contentLengthField

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-10-17 14:26:19 +11:00
Simone Bordet 1302c835e2 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-10-10 12:38:29 +02:00
Simone Bordet 687873cb7b Issue #4115 - Drop HTTP/2 pseudo headers.
Fixed NPE if the method was missing.
Renamed lowCase -> lowerCase.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-10 11:11:36 +02:00
Simone Bordet 6acc9f7be5 Issue #4115 - Drop HTTP/2 pseudo headers.
Updates after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-09 21:01:30 +02:00
Joakim Erdfelt d7a189fa18 Updating to version 10.0.0-SNAPSHOT 2019-10-03 12:05:26 -05:00
Joakim Erdfelt fd6a2cb9f6 Updating to version 10.0.0.alpha1 2019-10-03 11:25:06 -05:00
Joakim Erdfelt 7807eafad9 Updating to version 9.4.22-SNAPSHOT 2019-09-26 10:46:28 -05:00
Joakim Erdfelt 72970db61a Updating to version 9.4.21.v20190926 2019-09-26 09:59:15 -05:00
Lachlan Roberts af081459ee Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-09-25 15:06:17 +10:00
Greg Wilkins 11b60db4c3
Issue #4047 Graceful Write (#4100)
Added test to reproduce issue
Fixed bug from #2772 where output was shutdown on DONE without checking for END.
Fixed aggregation logic to aggregate last write if aggregation already started
Improved comments and clarify conditions

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-09-25 12:13:56 +10:00
Simone Bordet 098f5029c8 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-09-12 15:51:23 +02:00
Greg Wilkins 905bf82f80 reformatting
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-09-12 10:14:58 +10:00
Simone Bordet d69a1f0f58 Merged branch 'jetty-10.0.x' into 'jetty-10.0.x-3537-bootstrap_websocket_http2'. 2019-09-12 00:11:01 +02:00
olivier lamy 3de6d6f6e7 Merge branch 'jetty-9.4.x' into jetty-10.0.x 2019-09-11 17:23:38 +10:00
Olivier Lamy 37f96bdf2b
Issue #4075 Accept pattern such /On* and do exact path match (#4080)
* Issue #4075 accept url-pattern such /On* as exact match

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

* changes after review from Greg

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-09-11 17:22:14 +10:00
Joakim Erdfelt 648b97b70b Merge branch 'jetty-9.4.x' into jetty-10.0.x 2019-09-05 13:08:14 -05:00
Joakim Erdfelt 2b1fe8c38d Issue #4057 - Clean up identified by PR review
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-09-05 12:04:23 -05:00
Joakim Erdfelt 91d3ddced6 Issue #4057 - NPE in HttpFields.containsKey
+ Preventing HttpField from having a null name.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-09-05 10:04:25 -05:00
Chris Walker 189ba7a671
Merge from 9.4.x 2019-09-02 14:49:33 -04:00
康智冬 49ba6d1acb fix typo and grammar (#4045)
Signed-off-by: KangZhiDong <worldkzd@gmail.com>
2019-09-02 14:29:50 -04:00
Joakim Erdfelt a6ab777150 Merge branch `jetty-9.4.x` into `jetty-10.0.x`
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

# Conflicts:
#	jetty-http/src/test/java/org/eclipse/jetty/http/CookieCutterTest.java
#	jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java
2019-08-27 14:23:00 -05:00
Greg Wilkins d1c462c966 fix checkstyle
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-08-27 19:06:32 +10:00
Greg Wilkins af8587c108 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-08-27 08:15:41 +10:00
Greg Wilkins bde86467f4
Issue #3806 - Make Async sendError fully Async (#3912)
* Issue #3806 async sendError

Avoid using isHandled as a test withing sendError as this can be
called asynchronously and is in a race with the normal dispatch of the
request, which could also be setting handled status.

The ErrorHandler was dispatching directly to a context from within
sendError.  This meant that an async thread can call sendError and be
dispatched to within the servlet container at the same time that the
original thread was still dispatched to the container.

This commit fixes that problem by using an async dispatch for error
pages within the ErrorHandler.  However, this introduces a new problem
that a well behaved async app will call complete after calling
sendError.  Thus we have ignore complete ISEs for the remainder of
the current async cycle.

Fixed the closing of the output after calling sendError. Do not
close if the request was async (and thus might be dispatched to an
async error) or if it is now async because the error page itself is
async.

* updates from review
* better tests
* revert ignore complete
* added some TODOs
* more TODOs
* fixed rename
* cleanup ISE and more TODOs
* refactored to call sendError for uncaught exceptions rather than onError
* more of the refactor
* extra tests for sendError from completing state

Reworked HttpChannelState and sendError so that sendError is now
just a change of state. All the work is done in the ErrorDispatch
action, including calling the ErrorHandler.  Async not yet working.

Additional tests

Converted ERRORED state to a separate boolean so it can be used for
both Sync and Async dispatches.

Removed ASYNC_IO state as it was just the same as DISPATCHED

The async onError listener handling is now most likely broken.


WIP making sendError simpler and more tests pass
WIP handling async and thrown exceptions
WIP passing tests

Improved thread handling

removed bad test

Implemented error dispatch on complete properly
more fixed tests

sendError state looks committed

- Added resetContent method to leave more non-content headers during sendError
- Fixed security tests
- simplified the non dispatch error page writing.  Moved towards being able to write async

* fixed gzipHandlerTest

* Updated handling of timeout errors.  According to servlet spec,
exceptions thrown from onTimeout should not be passed to onError, but
just logged and ignored:

   If an exception is thrown while invoking methods in an AsyncListener,
   it is logged and will not affect the invocation of any other AsyncListeners.

* This changes several tests.

* Dispatcher/ContextHandler changes for new ERROR dispatch handling. Feels a bit fragile!

* Fixed tests in jetty-servlets
* Fixed tests in jetty-proxy

* more test fixes

* Fixed head handling
reverted unnecessary changes
Improved reason handling

WIP on fully async error handling.
Simplified HttpChannelState state machines to allow for async actions
during completing

more WIP on fully async error handling.

sendError and completion are not both non-blocking, without using
a startAsync operation. However we are lacking unit tests that actually
exercise those code paths.

* Simplified name of states
Added test for async completion
* Cleanups and javadoc
* Cleanups and javadoc
* remove snake case
* feedback from review
* Write error page into fixed pooled buffer

Use the response to get/release a pooled buffer into which the error
page can be written.  Make it a fixed sized buffer and if it overflows
then no error page is generated (first overflow turns off showstacks
to save space).

The ErrorHandler badly needs to be refactored, but we cannot change
API in jetty-9

* More test fixes for different error page format
* minor cleanups
* Cleanup from Review
* Fixed javadoc
* cleanups and simplifications
* Cleanup from Review
* renaming and some TODOs
* Cleanup from Review
* Checkstyle fixes
* Cleanup from Review
* Code cleanups and simplifications
* fixed debug
* Cleanup from Review
* Ensure response sent before server shutdown
* removed unnecessary optimisation
* fixed duplicate from merge
* Updates from review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-08-26 17:55:58 +10:00
Joakim Erdfelt 36ef975353 Merge branch `jetty-9.4.x` into `jetty-10.0.x`
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

# Conflicts:
#	jetty-http/src/main/java/org/eclipse/jetty/http/CookieCutter.java
#	jetty-http/src/test/java/org/eclipse/jetty/http/CookieCutterTest.java
#	jetty-servlet/src/test/java/org/eclipse/jetty/servlet/DefaultServletTest.java
#	jetty-util/src/test/java/org/eclipse/jetty/util/resource/FileSystemResourceTest.java
2019-08-23 08:52:52 -05:00
olivier lamy a36af67abf Merge branch 'jetty-9.4.x' into jetty-10.0.x 2019-08-22 20:45:57 +10:00
Olivier Lamy fe3d3f7158
fix checkstyle in test sources (#4013)
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-08-22 19:56:41 +10:00
Greg Wilkins d04c5f1e2a Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-08-20 16:23:09 +10:00
Bruce a1bb3b4491 fix formatting and change comment flags to attributes
Signed-off-by: Bruce MacDonald <brucewmacdonald@gmail.com>
2019-08-20 15:12:03 +10:00
Bruce 6ad148c8f9 parse samesite from cookie comment flag utility functions
Signed-off-by: Bruce MacDonald <brucewmacdonald@gmail.com>
2019-08-20 15:12:03 +10:00
Bruce 2e5f6fca4b parse SameSite specifier from cookie comment and move HttpOnly comment parsing to org.eclipse.jetty.http.HttpCookie
Signed-off-by: Bruce MacDonald <brucewmacdonald@gmail.com>
2019-08-20 15:12:03 +10:00