Commit Graph

1397 Commits

Author SHA1 Message Date
Greg Wilkins 2619edff5a 461452 Double release of buffer by HttpReceiverOverHTTP
Clear buffer on exception to avoid release guard
2015-03-05 16:22:07 +11:00
Greg Wilkins 042de2ec9f 461452 Double release of buffer by HttpReceiverOverHTTP
Updated HttpParse to always return from parseNext when messageComplete is called.  This allows it to notice reentrant state changes
and removes the need for HttpReceiverOverHTTP.methodComplete to return true, thus avoiding the race.
2015-03-05 15:26:19 +11:00
Greg Wilkins 418a60bbd0 461452 Double release of buffer by HttpReceiverOverHTTP
Updated comments to better describe the race to double release the buffer
2015-03-05 12:15:31 +11:00
Greg Wilkins 8cbab09527 461452 Double release of buffer by HttpReceiverOverHTTP
This commit is just a tidy up of the code to reduce the size of the race causing this problem.  It is not a fix.
2015-03-05 11:05:35 +11:00
Simone Bordet 40ad8dc608 Notifying the "failure" event for request and response when the failure
is detected during the processing of another event.
2015-03-04 01:01:09 +01:00
Simone Bordet 66df49bb4c Clarified test code. 2015-03-02 09:57:42 +01:00
Simone Bordet ec2fcb6648 Made tests more stable by consuming the content on the server.
When the content was not consumed, it was possible that the response
arrived to the client before it was able to send the whole request
content.
In some cases/tests this would cause the request to fail, thereby
failing the test as well.
2015-02-27 11:06:57 +01:00
Simone Bordet b86ab56cfc Fixed test. 2015-02-27 10:26:24 +01:00
Simone Bordet 27beeff164 Merged branch 'jetty-9.2.x' into 'master'. 2015-02-27 09:56:32 +01:00
Simone Bordet da80498c56 Improved logging. 2015-02-26 23:38:27 +01:00
Simone Bordet bbc2d0c29d Simplified abort logic. 2015-02-26 23:26:24 +01:00
Simone Bordet 31a0b36f3c Improved logging and toString() implementations. 2015-02-26 23:26:24 +01:00
Simone Bordet 008b03ac78 460905 - Make sure TimeoutCompleteListener is cancelled if the request cannot be sent. 2015-02-26 12:25:42 +01:00
Simone Bordet d5a6ad2345 460905 - Make sure TimeoutCompleteListener is cancelled if the request cannot be sent. 2015-02-26 10:56:19 +01:00
Greg Wilkins 165ae8f238 Improved LocalConnector 2015-02-26 20:13:45 +11:00
Jesse McConnell 1659d83978 [maven-release-plugin] prepare for next development iteration 2015-02-24 10:38:33 -06:00
Jesse McConnell dc0c3f4c52 [maven-release-plugin] prepare release jetty-9.2.9.v20150224 2015-02-24 10:38:28 -06:00
Simone Bordet d9255d02d8 Fixed test. 2015-02-24 13:08:21 +01:00
Simone Bordet c52ba39722 Preventing NPE in case the exchange is failed in the middle of
sending content.
2015-02-24 13:01:11 +01:00
Simone Bordet 58ea526b56 Notifying client connection's promise from onOpen().
The client connection's promise was succeeded in the context of a
call to SelectorManager.newConnection().
This was wrong, since succeeding the promise may trigger the send
of a request *before* the connection is actually linked to the
endPoint and opened.

This change moves the succeeding of the client connection's promise
to the connection onOpen() method.
2015-02-20 18:23:31 +01:00
Simone Bordet a01d85f0d9 Merged branch 'jetty-9.2.x' into 'master'. 2015-02-20 16:08:18 +01:00
Simone Bordet 71f6527cae Removed extra dispatches from HTTP client code. 2015-02-20 16:02:54 +01:00
Simone Bordet b69b8dfe50 460443 - Race condition releasing the response buffer.
Fixed by making sure that the response buffer is released at the
appropriate times.
2015-02-20 16:00:42 +01:00
Simone Bordet ddde0db339 Added test to check that a 100 Continue response and a normal response,
when read in a single read by the client, are processed correctly.
2015-02-20 16:00:42 +01:00
Jesse McConnell ce5db2ca55 [maven-release-plugin] prepare for next development iteration 2015-02-17 16:02:22 -06:00
Jesse McConnell 26b7597928 [maven-release-plugin] prepare release jetty-9.2.8.v20150217 2015-02-17 16:02:16 -06:00
Simone Bordet 28b9a0927c Merged branch 'jetty-9.2.x' into 'master'. 2015-02-15 20:51:49 +01:00
Simone Bordet ffa32dfae7 459963 - Failure writing content of a committed request leaks connections.
Fixed by making the logic in HttpSender fail and complete the response
in case of request failure, without taking in consideration whether
the request was committed or aborted.
2015-02-15 20:42:55 +01:00
Simone Bordet cf022de2fd Removed unused @Slow annotations. 2015-02-15 20:41:36 +01:00
Simone Bordet 8f0a874163 Removed unnecessary hiding of stack traces. 2015-02-15 20:40:50 +01:00
Simone Bordet ed1cbc0631 Improved logging. 2015-02-15 20:39:01 +01:00
Greg Wilkins 0f7ee8d607 Merge remote-tracking branch 'origin/jetty-9.2.x'
Conflicts:
	jetty-http/src/main/java/org/eclipse/jetty/http/HttpParser.java
	jetty-http/src/main/java/org/eclipse/jetty/http/HttpVersion.java
	jetty-io/src/main/java/org/eclipse/jetty/io/EndPoint.java
	jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java
2015-02-13 11:45:56 +11:00
Greg Wilkins 2b2a70a93a 459845 Support upgrade
Added the concept of UpgradeFrom and UpgradeTo connections that support
transferring a buffer with content before opening new connection.
Aded EndPoint.update method as utility
2015-02-13 11:41:18 +11:00
Simone Bordet be860741d5 459655 - Remove SPDY and NPN.
Cleanup of javadocs, comments, XML and other text files.
2015-02-11 16:18:07 +01:00
Simone Bordet 7dffe4f082 459542 - AsyncMiddleManServlet race condition on first download content.
Fixed the race condition by submitting a zero length buffer to write
from onWritePossible() which will succeed the callback without
causing races.
2015-02-10 13:16:41 +01:00
Simone Bordet 12e2f9e6c8 459542 - AsyncMiddleManServlet race condition on first download content.
Fixed the race condition by submitting a zero length buffer to write
from onWritePossible() which will succeed the callback without
causing races.
2015-02-10 13:10:57 +01:00
Simone Bordet cb5541b58e Merged branch 'jetty-9.2.x' into 'master'. 2015-02-09 17:39:16 +01:00
Simone Bordet f974c74329 Implemented HTTP2Client connect timeout. 2015-02-09 16:22:21 +01:00
Simone Bordet 2a749dc0ea Fail the callback in case we cannot activate a newly created connection. 2015-02-09 12:11:18 +01:00
Simone Bordet 96132dbe45 Merged branch 'jetty-9.2.x' into 'master'. 2015-02-09 08:56:03 +01:00
Simone Bordet 43f14997d8 Improved toString() methods for better reporting during dump(). 2015-02-09 08:54:52 +01:00
Simone Bordet 99da9ce98e Merged branch 'jetty-9.2.x' into 'master'. 2015-02-06 21:45:22 +01:00
Simone Bordet ee16dfd066 Added test to verify the complete event is not fired until the
content is consumed.
2015-02-06 21:42:07 +01:00
Simone Bordet 12eaedd96b Refactored HttpDestination to allow customization of the request enqueuing.
Subclasses may override enqueue() and provide a different algorihtm.
2015-02-06 21:42:07 +01:00
Simone Bordet 961a90d16c Merged branch 'jetty-9.2.x' into 'master'. 2015-01-29 14:11:21 +01:00
Simone Bordet e03cd5e286 451092 - Connector will fail if HeaderListener return false.
Not a bug, but wrote one more test and clarified Javadocs.
2015-01-29 11:44:11 +01:00
Simone Bordet af312dbca0 Fixed case where a trying to send a request was causing an IllegalStateException.
It is always possible that a request is aborted by the client code
while being sent, so we should just return rather than throwing.
2015-01-29 11:13:39 +01:00
Simone Bordet b6e4852179 Improved dump() output. 2015-01-29 11:13:39 +01:00
Simone Bordet 88ed996295 Improved toString(). 2015-01-29 11:13:39 +01:00
Simone Bordet a52703cba9 458527 - Implement an async proxy servlet that can perform content transformations. 2015-01-27 15:29:47 +01:00
Jesse McConnell aa22842c20 [maven-release-plugin] prepare for next development iteration 2015-01-16 17:48:29 -06:00
Jesse McConnell 8c58a9abc4 [maven-release-plugin] prepare release jetty-9.2.7.v20150116 2015-01-16 17:48:23 -06:00
Jesse McConnell 81bb8411d1 [maven-release-plugin] prepare for next development iteration 2015-01-16 12:06:36 -06:00
Jesse McConnell 7865f88b81 [maven-release-plugin] prepare release jetty-9.2.7.v20150116 2015-01-16 12:06:30 -06:00
Jesse McConnell db991355a2 [maven-release-plugin] prepare for next development iteration 2015-01-16 10:41:45 -06:00
Jesse McConnell 6930abb8d3 [maven-release-plugin] prepare release jetty-9.2.7.v20140116 2015-01-16 10:41:39 -06:00
Jesse McConnell 9225b124a4 [maven-release-plugin] prepare for next development iteration 2015-01-16 08:21:35 -06:00
Jesse McConnell ebd563e64d [maven-release-plugin] prepare release 9.2.7.v20140116 2015-01-16 08:21:29 -06:00
Simone Bordet 6861da11b9 457130 - HTTPS request with IP host and HTTP proxy throws IllegalArgumentException.
Fixed handling of cookies in case of null URI.
2015-01-09 16:08:41 +01:00
Simone Bordet c7d9c5c951 457130 - HTTPS request with IP host and HTTP proxy throws IllegalArgumentException.
Fixed handling of cookies in case of null URI.
2015-01-09 16:07:41 +01:00
Simone Bordet 86c2d01e80 Merged branch 'jetty-9.2.x' into 'master'. 2015-01-09 12:59:17 +01:00
Simone Bordet fd13361132 Fixed test assumption. 2015-01-09 12:58:14 +01:00
Simone Bordet 8a27385bc3 Merged branch 'jetty-9.2.x' into 'master'. 2015-01-09 12:51:13 +01:00
Simone Bordet bb2872b789 Fixed test assumption. 2015-01-09 12:46:56 +01:00
Simone Bordet adae3193d8 457130 - HTTPS request with IP host and HTTP proxy throws IllegalArgumentException.
Fixed by handling the case of non-URI request target.
2015-01-09 11:49:13 +01:00
Joakim Erdfelt 7e7dd40f0a Happy New Year 2015 (merge from master) 2015-01-08 09:14:13 -07:00
Simone Bordet 0c21d7c78b Merged branch 'jetty-9.2.x' into 'master'. 2015-01-08 16:57:45 +01:00
Simone Bordet 51aafc78a4 457032 - Request sent from a failed CompleteListener due to connect timeout is failed immediately.
Fixed by copying the exchange queue and failing only the exchanges
that are present in the copy.
2015-01-08 16:56:59 +01:00
Joakim Erdfelt a3201a3c81 Happy New Year 2015 2015-01-07 17:06:59 -07:00
Joakim Erdfelt 6a0668b7a1 Happy New Year 2015 2015-01-07 17:03:30 -07:00
Simone Bordet a85a74bbdc Reworked buffer releasing to ensure that it is always executed before
fillInterested() is called.
This is needed to avoid race conditions where fillInterested()
triggers a new thread entering onFillable() and acquiring a new buffer
while the previous thread is releasing the previous buffer.
2015-01-02 18:22:39 +01:00
Greg Wilkins cc216eb8ee fixed client proxy test 2015-01-02 15:38:12 +01:00
Greg Wilkins e1e57924dc fixed client test for new lazy consumeAll behaviour 2015-01-02 15:36:34 +01:00
Greg Wilkins dcd9182f87 fixed client test for new lazy consumeAll behaviour 2015-01-02 15:31:34 +01:00
Greg Wilkins a4d2895400 removed unneeded execute for SslConnection onFillable 2015-01-02 15:24:14 +01:00
Greg Wilkins 3af9b145a3 Deprecated the AbstractConnection dispatchIO mechanism 2015-01-01 16:18:13 +01:00
Greg Wilkins 5f2a7fdfce fixed http client respond before consumed test.
The server now is a bit lazier if the handler has not consumed content.  It will not block to consume and gives up and closes the connection instead.
2014-12-31 11:48:23 +01:00
Simone Bordet 9cff4a57e7 Merged branch 'master' into 'jetty-9.3-ewyk'. 2014-12-22 21:34:10 +01:00
Simone Bordet e8c88cfd9c Merged branch 'jetty-9.2.x' into 'master'. 2014-12-22 21:32:09 +01:00
Simone Bordet c944b06a61 New tests testing request retry. 2014-12-22 21:27:59 +01:00
Greg Wilkins 3b34423b17 EWYK SelectorManager 2014-12-18 17:06:32 +01:00
Greg Wilkins cdd2b0a9d2 refacted SelectorManager to have a ManagedSelector 2014-12-17 16:29:24 +01:00
Greg Wilkins 28fb3e45d0 453636 Improved spin detection on test 2014-12-10 10:16:16 +01:00
Jan Bartel bc22ba72dc [maven-release-plugin] prepare for next development iteration 2014-12-05 16:45:12 +01:00
Jan Bartel 1cc075cf98 [maven-release-plugin] prepare release jetty-9.2.6.v20141205 2014-12-05 16:45:01 +01:00
Jesse McConnell 127b48c932 [maven-release-plugin] prepare for next development iteration 2014-12-03 09:00:57 -06:00
Jesse McConnell 028f4b9610 [maven-release-plugin] prepare release jetty-9.2.6.v20141203 2014-12-03 09:00:46 -06:00
Jesse McConnell 1263d1f3c8 [maven-release-plugin] prepare for next development iteration 2014-12-03 08:26:47 -06:00
Jesse McConnell 5c7f706496 [maven-release-plugin] prepare release jetty-9.2.6.v20141203 2014-12-03 08:26:35 -06:00
Jesse McConnell 09846e324d [maven-release-plugin] prepare for next development iteration 2014-11-12 17:13:19 -06:00
Jesse McConnell 97d2bd95a6 [maven-release-plugin] prepare release jetty-9.2.5.v20141112 2014-11-12 17:13:14 -06:00
Jesse McConnell 5d0595cabd [maven-release-plugin] prepare for next development iteration 2014-11-03 13:46:58 -06:00
Jesse McConnell 772ff0bfd4 [maven-release-plugin] prepare release jetty-9.2.4.v20141103 2014-11-03 13:46:52 -06:00
Simone Bordet 64597b318c Merged branch 'jetty-9.2.x' into 'master'. 2014-11-03 17:25:37 +01:00
Simone Bordet 9c64fb73e4 449603 - OutputStreamContentProvider hangs when host is not available.
Fixed by having HttpRequest.abort() to fail the ContentProvider.
In this way, the ContentProvider knows, even before being used to
send the request content, that the request has failed, and may
forward the failure to the client code.
2014-11-03 16:50:59 +01:00
Simone Bordet cbd7b75e10 Removed unused code. 2014-11-03 10:55:13 +01:00
Jesse McConnell 1c4a08b35b [maven-release-plugin] prepare for next development iteration 2014-10-31 09:58:16 -05:00
Jesse McConnell a4ff7bf841 [maven-release-plugin] prepare release jetty-9.2.4.v20141031 2014-10-31 09:58:10 -05:00
Jesse McConnell e1b73a64eb [maven-release-plugin] prepare for next development iteration 2014-10-30 11:28:41 -05:00
Jesse McConnell 5770cc1179 [maven-release-plugin] prepare release jetty-9.2.4.v20141030 2014-10-30 11:28:35 -05:00