88 Commits

Author SHA1 Message Date
Greg Wilkins
1cb0449be3 Organised imports 2015-03-26 12:32:15 +11:00
Simone Bordet
999177ccc2 Fixed race sending SETTINGS with INITIAL_WINDOW_SIZE.
Before, the sender was updating the window size after the SETTINGS
frame was written.
This was leading to a race where the receiver saw the updated window
size and sent DATA frames; these were received by the original sender
before it had the chance to update its local window size, causing an
error.
Now, the update of the window size happen just before writing the
SETTINGS frame to avoid this race.
2015-03-25 19:24:28 +01:00
Simone Bordet
2a21f8cb2f Renamed ISession.control() to ISession.frames(). 2015-03-20 15:02:07 +01:00
Simone Bordet
4107444beb Tests for async proxy functionality. 2015-03-20 14:53:11 +01:00
Simone Bordet
ffb15aa5fb Made test more reliable.
Testing for stream.isClosed() is done in StreamCloseTest.
The tests were failing because receiving the headers does not mean
the sending the headers has notified the callback yet, and hence
closed the stream.
2015-03-12 20:54:40 +01:00
Simone Bordet
36f317382f More flow control tests. 2015-03-11 18:43:00 +01:00
Simone Bordet
8673c6bba7 Clarified test and made it more reliable. 2015-03-11 17:12:38 +01:00
Simone Bordet
560ec6301e 423974 - Optimize flow control.
Made the buffering flow control strategy the default.
2015-03-11 16:27:31 +01:00
Simone Bordet
48887377c9 459081 - http2 push failures.
Introduced ExecutionStrategy.dispatch() to handle the case where
resources that are being pushed block.
2015-03-11 00:12:57 +01:00
Simone Bordet
73821e7ac6 461052 - Local streams created after INITIAL_WINDOW_SIZE setting have wrong send window.
Fixed by tracking both send and recv initial stream windows.
This is needed because both client and server may send an
INITIAL_WINDOW_SIZE setting, and they must be treated
separately.
2015-02-27 19:21:35 +01:00
Simone Bordet
b533aa6ce5 Made tests more stable.
Naked writes could throw WritePendingException.
Now we wait until the client has finished sending the reply to the
server SETTINGS frame, then we do the naked write.
2015-02-27 12:30:42 +01:00
Simone Bordet
7c315ebce5 Fixed test. 2015-02-24 15:59:32 +01:00
Simone Bordet
6ad90c259c Fixed test. 2015-02-24 14:51:30 +01:00
Simone Bordet
84b8882624 Using TestTracker Rule in test classes. 2015-02-18 23:00:37 +01:00
Simone Bordet
d4809e9b79 Improved handling of the stream close state.
Now the stream close state is updated when the frame has been
successfully written, and when it is received.
The stream is closed in case of failures.
Just after the stream close state update, if the stream is closed
then it is removed from the session.
2015-02-18 23:00:37 +01:00
Greg Wilkins
e18573f4a3 460211 Fixed Idle race in ExecuteProduceRun
Reimplemented ExecuteProduceRun with a spin lock
2015-02-18 21:47:22 +11:00
Greg Wilkins
cb5d91df19 ignored bad http2 client test 2015-02-18 09:20:27 +11:00
Simone Bordet
5a40ed5a0d Fixed test, and added test to check close state of pushed streams. 2015-02-13 18:08:39 +01:00
Simone Bordet
ff7e0e626a Implemented notification of session failure events. 2015-02-13 14:18:08 +01:00
Greg Wilkins
a2e051c4e0 made StreamResetTest test less of a race 2015-02-13 16:15:08 +11:00
Greg Wilkins
4db654ad32 Organised http2 imports 2015-02-13 13:43:32 +11:00
Greg Wilkins
c3332e7d2e 459845 - Support upgrade from http1 to http2/websocket
Added support for unofficial "upgrade" from http/1 to h2c
2015-02-13 12:16:03 +11:00
Joakim Erdfelt
7811c10727 Fixing http2-client test quirk when 2015-02-12 14:42:02 -07:00
Simone Bordet
0677735550 Simplified HTTP/2 parser and its listener.
It is not possible to perform asynchronous processing of the content
of DATA frames, because otherwise the parser has to stop, stalling
all other streams.
Parser.Listener methods were returning boolean in a vestigial attempt
to handle asynchronous data processing, and have now been converted to
return void.
2015-02-12 19:43:52 +01:00
Greg Wilkins
a147cee480 459731 - Update for drafts hpack-11 and http2-17 2015-02-12 14:45:12 +11:00
Simone Bordet
f974c74329 Implemented HTTP2Client connect timeout. 2015-02-09 16:22:21 +01:00
Simone Bordet
85edb7e573 Improved configurability of HTTP2Client. 2015-02-09 14:24:09 +01:00
Simone Bordet
d0f0aa7c9f Fixed removal of streams upon sending the response HEADERS frame. 2015-02-09 13:26:01 +01:00
Simone Bordet
7066f65e8c 423974 - Optimize flow control.
Implemented a buffering FlowControlStrategy that reduces the amount
of WindowUpdate exchanges.
2015-02-09 13:25:32 +01:00
Simone Bordet
fa72356d1d Fixed failure of stalled frames. 2015-02-09 09:11:56 +01:00
Simone Bordet
02b5732720 First take at implementing the HttpClientTransport for HTTP2. 2015-02-09 09:11:56 +01:00
Greg Wilkins
e1cc5fb487 Merge remote-tracking branch 'origin/master' into jetty-9.3-ewyk
Conflicts:
	jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java
	jetty-server/src/main/java/org/eclipse/jetty/server/QueuedHttpInput.java
	jetty-util/src/main/java/org/eclipse/jetty/util/thread/NonBlockingThread.java
2015-01-08 15:21:01 +01:00
Joakim Erdfelt
a3201a3c81 Happy New Year 2015 2015-01-07 17:06:59 -07:00
Greg Wilkins
3af9b145a3 Deprecated the AbstractConnection dispatchIO mechanism 2015-01-01 16:18:13 +01:00
Greg Wilkins
cdd2b0a9d2 refacted SelectorManager to have a ManagedSelector 2014-12-17 16:29:24 +01:00
Greg Wilkins
7b41e78f74 Improved HttpChannelOverHTTP2 recycling 2014-12-05 08:36:51 +01:00
Simone Bordet
8d2efaf7eb 445167 - Allow configuration of dispatch after select.
Introduced parameter "dispatchIO" in the relevant factories so that
they can be configured by users and connections will be created
taking into account this parameter.

For less configurable connection factories, this parameter is
currently hardcoded to either true or false depending on the case.
For example, ALPN and NPN connections have it to false, since they
don't do any blocking operation in onFillable().
2014-09-26 10:13:16 +02:00
Simone Bordet
8af9ea4030 Calling notIdle() to avoid the idle timeout triggers when sending frames. 2014-09-26 10:13:16 +02:00
Simone Bordet
9a1acd59fc Made test more robust. 2014-09-26 10:13:15 +02:00
Jesse McConnell
3095a179f9 [maven-release-plugin] prepare for next development iteration 2014-09-24 12:24:31 -05:00
Jesse McConnell
390f3200cc [maven-release-plugin] prepare release jetty-9.3.0.M0 2014-09-24 12:24:23 -05:00
Simone Bordet
51631c2a46 Made the test more robust, avoiding WritePendingExceptions. 2014-09-19 10:33:09 +02:00
Simone Bordet
bfda3620f3 444485 - Client resets stream, pending server data is failed, write hangs.
Fixed by ensuring that when a failure happens, either by catching an
exception or by failing a callback, we always call completed() and
abort the channel (via new method terminate()).
2014-09-18 16:31:16 +02:00
Simone Bordet
ef4e0a9e7c Made the test more reliable. 2014-09-17 20:56:05 +02:00
Simone Bordet
5370f3c8cb 442950 - Embedded Jetty client requests to localhost hangs with high cpu usage (NIO OP_CONNECT Solaris/Sparc). 2014-09-01 12:06:18 +02:00
Simone Bordet
c07ea68b51 Improved configurability of stream idle timeout. 2014-08-21 11:54:03 +02:00
Simone Bordet
75c1322adc Rewritten close workflow to make sure that connections are correctly closed. 2014-08-21 11:54:03 +02:00
Simone Bordet
c10e5e8833 Renamed PushTest -> PushCacheFilterTest. 2014-08-21 11:54:02 +02:00
Simone Bordet
c15480644f 442083 - Client resets stream, pending server data is failed, connection closed.
Introduced ResetException, and using it when failing frames of streams
that have been reset already.

HttpTransportOverHTTP2.abort(Throwable) checks for this exception and
does not close the connection.
2014-08-19 18:40:01 +02:00
Simone Bordet
d4f140ff65 Ignoring HEADERS, PUSH_PROMISE and DATA if the stream cannot be found.
This typically happens when the stream has been reset.
2014-08-19 13:43:24 +02:00