Commit Graph

973 Commits

Author SHA1 Message Date
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
Joakim Erdfelt f4e7e4c3db Merge branch 'release-9.4.25' into jetty-9.4.x 2020-01-03 12:49:27 -06: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
Greg Wilkins c5acf96506
Jetty 9.4.x 4331 async close complete3 (#4409)
* Issue #4376 Async Content Complete

Added test harness to reproduce unready completing write.
Fixed test by not closing output prior to becoming READY

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

* Issue #4331 Async Write Complete

Test harness to reproduce unready when closing/completing.

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

* Issue #4331 Async Write Complete

test both PENDING and UNREADY

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

* Issue #4331 Async Write Complete

test cleanups

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

* Issue #4331 Async Close Complete

Cleanups of write

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

* WIP

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

* Issue #4331 Close Complete

Work in progress

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

* Issue #4331 Close Complete

Added async close to HttpWriter and ResponseWriter
Always use async close, with blocker if necessary.

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

* Issue #4331 Close Complete

Working async close complete!

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

* Issue #4331 Close Complete

invert test as we can now call complete when not ready!

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

* Issue #4331 Close Complete

fixed transition to ERROR state

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

* Issue #4331 Close Complete

async close after onError

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

* Issue #4331 Close Complete

minor cleanups

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

* Issue #4331 Close Complete

Fix for proxy tests

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

* Issue #4331 Close Complete

Fix write loop to handle clear of p=0,l=0 rather than p=l

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

* Issue #4331 Close Complete

Removed old close on all content mechanism
Cleanups and some more TODOs

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

* Issue #4331 Close Complete

a reworking of HttpOutput to separate out API state.

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

* Issue #4331 Close Complete

Soft close for Dispatcher
release buffer in onWriteComplete

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

* Issue #4331 Close Complete

Set _onError in onWriteComplete
NOOP callback instead of null

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

* Issue #4331 Close Complete

failure closes HttpOutput

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

* Issue #4331 Close Complete

Moved closedCallback handling to onWriteComplete

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

* Issue #4331 Close Complete

Additional test of complete during blocking write.

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

* Issue #4331 Close Complete

reimplemented blocking close to sometimes be async

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

* Issue #4331 Close Complete

ascii "art"

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

* Issue #4331 Close Complete

Code cleanup.  Use a CLOSE state rather than non null closedCallback to be clearer that it is a state.
Renamed close(Callback) to complete(Callback)
Renamed and simplified closed() to completed()

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

* Issue #4331 Close Complete

Do not dispatch
Better ascii art
improved close impl to be similar to complete

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

* Issue #4331 Close Complete

More test cases

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

* Issue #4331 Close Complete

retain execute behaviour in 9.4. review in 10.

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

* Improved javadoc and ascii art

* Improved CLOSING

Switch to CLOSING state as soon as last write is done, even if several non last channelWrites will be done.   This allows a subsequent call to close to know that nothing needs to be written and can avoid some EOF exceptions. Now onWriteComplete acts only on the passed in last parameter.

Added test for sendContent

* WIP

Aggregate within lock
pipeline test debug

* Avoid creating ignored exception when Idle or Failed.

* Try a parse without fill to avoid unconsumed input debug

* fixed pipeline size

* release buffer before callback

* turn off debug

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

* Issue #4331 Close Complete

Better javadoc
refactored onWriteComplete logic to be simpler
fixed bug with flush of last written byte

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

* Issue #4331 Close Complete

Completely reworked test harness for better coverage.

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

* Issue #4331 Close Complete

Reworked order of ifs to match logic above in onWriteComplete

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-12-19 12:17:11 +11: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 dc03431de2 Merge branch 'release-9.4.23' into jetty-9.4.x 2019-11-20 07:14:53 -06:00
Simone Bordet d44a6935ef Issue #4331 - Improve handling of HttpOutput.close() for pending writes.
Added test case that verifies the current behavior (abort the response
in case complete() is called with a pending write()).

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-11-19 17:09:04 +01: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 89a4f92411
Merge pull request #4302 from eclipse/jetty-9.4.x-4301-demand_beforecontent_not_forwarded
Fixes #4301 - Demand beforeContent is not forwarded.
2019-11-14 01:42:28 +03:00
Simone Bordet aa57463175 Fixes #4301 - Demand beforeContent is not forwarded.
Now correctly handling no demand before the content
in FCGI and HTTP2 transports.

Fixed HttpRequest to correctly forward onBeforeContent()
to wrapped listeners.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-11-12 23:33:21 +01:00
Simone Bordet ba1724ae34 Fixes #4258 - RateControl should be per-connection.
Updates after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-11-12 17:46:19 +01:00
Simone Bordet f675a87623 Fixes #4258 - RateControl should be per-connection.
Updates after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-11-05 23:55:38 +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
Simone Bordet f8449868e6 Fixes #4258 - RateControl should be per-connection.
Introduced RateControl.Factory to create instances of RateControl
for each connection.
Modified relevant XML files and added distribution test for h2.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-11-05 18:40:27 +01:00
Greg Wilkins 869c3b51ce
Issue #4265 Remove doError (#4266)
* Issue #4265 Remove doError

The doError method and the ErrorDispatchHandler class were
hang overs from when we needed to dispatch into a context to get sendError called, which would then generate the error page.

Now sendError doesn't do any generation, rather it changes state that arranges either for a minimal error page to be generated or an ERROR dispatch to a real handler/servlet to generate the error page.

Thus the ErrorDispatchHandler and doError methods can now be removed.

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

* Issue #4265 Remove doError

Moved the error page dispatching logic back to the ErrorHandler class to assist with backwards compatibility

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

* Issue #4265 Remove doError

Moved the error page dispatching logic back to the ErrorHandler class to assist with backwards compatibility

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

* Issue #4265 doError

Updates from review.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-11-05 08:45:46 +11:00
Simone Bordet 3ae9faab79 Fixes #4251 - Http 2.0 clients cannot upgrade protocol in 9.4.22 release.
Updates after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-31 22:24:31 +01:00
Simone Bordet 4f19e6b638 Fixes #4251 - Http 2.0 clients cannot upgrade protocol in 9.4.22 release.
Fixed HTTP2-Settings header parsing.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-31 15:56:24 +01: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 83185334e0
Merge pull request #4182 from eclipse/jetty-9.4.x-4142-RateControl
Issue #4142 - module config for http2 maxSettingsKeys and RateControl
2019-10-15 13:00:26 +02:00
Lachlan Roberts 5329ecf5be Issue #4142 - changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-10-15 21:56:54 +11:00
Lachlan Roberts 4f640387f2 Issue #4142 - changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-10-15 21:09:01 +11:00
Lachlan Roberts 709e05a19f Issue #4142 - changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-10-15 19:08:45 +11:00
Lachlan Roberts 5ff79b0bf1 Issue #4142 - changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-10-15 11:23:53 +11:00
Lachlan Roberts a96fb176f6 Issue #4142 - module config for http2 maxSettingsKeys and RateControl
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-10-11 11:24:48 +11:00
Simone Bordet cd57af4caf
Merge pull request #4116 from eclipse/jetty-9.4.x-4115-drop_http2_pseudo_headers
Fixes #4115 - Drop HTTP/2 pseudo headers.
2019-10-10 12:15:58 +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
Simone Bordet 3be178c966 Merged 'jetty-9.4.x' into 'jetty-9.4.x-2429-httpclient_backpressure'. 2019-10-03 13:17:39 +02:00
Simone Bordet 609c144ae0 Fixes #4115 - Drop HTTP/2 pseudo headers.
Invalid HTTP/2 headers are now causing an error rather than being ignored.

HTTP2Flusher now catches HpackException.StreamException and generates a
RST_STREAM frame, rather than just closing the connection.

Modified HpackEncoder to throw HpackException in case of encoding failure.
Introduced HpackEncoder.validateEncoding (defaults true) so validation of
the headers can be disabled (useful for tests).

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-03 12:45:55 +02: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
Simone Bordet d39f19cc23 Issue #2429 - Review HttpClient backpressure semantic.
Introduced a Response.DemandedContentListener to explicitly separate
the will to request more content from the notification that the content
has been consumed.

Updated all transports to follow the new semantic: rather than waiting
for the callback to complete before delivering more content, now they
wait for the demand to be positive to deliver more content.

Since now the content may be unconsumed but there can be more demand,
all transport implementation had to be changed to use RetainableByteBuffer
to retain content buffers that were not consumed.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-09-19 17:19:25 +02:00
olivier lamy a117c4428a fix typo
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-09-13 06:22:09 +10:00
Simone Bordet 575a74d148
Merge pull request #4079 from eclipse/jetty-9.4.x-2815-hpackOpaqueBytes
Issue #2815 - HPack Opaque Bytes
2019-09-12 15:42:36 +02:00
Greg Wilkins afa987ac64 Update from review
reformat
Use ByteBuffer API

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-09-12 21:39:36 +10:00
Greg Wilkins 905bf82f80 reformatting
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-09-12 10:14:58 +10:00
Simone Bordet 63798f6664 Fixes #3956 - Remove and warn illegal HTTP/2 response headers.
Updates after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-09-11 23:55:25 +02:00
Greg Wilkins 90cf7c80bd avoid exceptions for non iso characters
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-09-11 10:50:42 +10:00
Greg Wilkins bc96561865 fixed bad merge
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-09-11 10:18:17 +10:00
Greg Wilkins bd220400a1 Merge branch 'jetty-9.4.x' into jetty-9.4.x-2815-hpackOpaqueBytes
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-09-11 10:17:33 +10:00
Simone Bordet c7867cdd5e Fixes #3956 - Remove and warn illegal HTTP/2 response headers.
Implemented RFC 7540 8.1.2.2.
Fields that should be removed are now dropped.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-09-09 19:47:06 +02:00
Simone Bordet 4e67e8594e Merged branch 'jetty-9.4.x' into 'jetty-9.4.x-3978-http2_vulnerabilities'. 2019-09-05 23:12:35 +02:00
Simone Bordet 508ad4aff9 Issue #3978 - HTTP/2 vulnerabilities.
Code cleanups and reformatting.

Fixed logic for SETTINGS frame replies: they are not subject to rate control.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-09-05 23:11:53 +02:00