Fixed logic in HttpDestination.RequestTimeouts, where now a timeout
is scheduled only when the expiration time is less than the existing one.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Various code cleanups.
Renamed HttpDestination.TimeoutTask to RequestTimeouts for clarity.
Improved javadocs, code comments and logging.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Updated the logic in SslContextFactory.Server.sniSelect(...) to check if there is
any certificate that matches, and if so return a null alias in the hope to be called
again and pick the right alias for the SNI.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Fix#6227 Async timeout dispatch race
Only allow the thread calling onTimeout to call dispatch and complete once timeout has expired.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Fixes#6208 - HTTP/2 max local stream count exceeded
Backported from Jetty 10 the "new stream" event so that the Stream can be set early on the client's `HttpChannelOverHTTP2`.
In this way, when a HEADERS frame stalled due to TCP congestion is failed, the corresponding Stream is closed and the connection released to the pool, fixing the "max stream exceeded" issue.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
FileBufferedResponseHandler adds an HttpOutput.Interceptor to buffer all responses into a file until the output is closed. This allows the commit to be delayed until the response is complete and thus headers and response status can be changed while writing the body.
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Added or expanded the scope of catch blocks to properly handle exceptions thrown by `HttpInput.Interceptor`.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
* Fixes#6105 - HttpConnection.getBytesIn() incorrect for requests with chunked content
Moved recording of bytes to fillRequestBuffer(),
so they are accounted also for async reads.
Added test case.
Fixed test that was too strictly comparing HttpConnection.bytesIn,
that now report a correct, but larger value.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Fix#6082 Reduce SSL buffer compaction
Only compact when buffer is underflown. Note that BufferUtil will also do a cheap "compact" when flipping empty buffers.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
(cherry picked from commit 96f707f74b93fa19b1eb8a99fe7f3794da6617fe)
Ensure that WebAppProvider Filter always canonicalises the file passed in from the Scanner. Thus, both the monitored directory is canonical as well as the file it is being compared against.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
Co-authored-by: Greg Wilkins <gregw@webtide.com>