Commit Graph

1113 Commits

Author SHA1 Message Date
Simone Bordet 1df50f86f9 Improved logging and toString() implementations. 2013-10-22 19:17:35 +02:00
Simone Bordet 8d9fd6ad71 Improved connection/destination close, so that a connection can
always notify its destination that it has been closed.
2013-10-22 18:00:55 +02:00
Simone Bordet c705bb9480 Avoid overwrite of the abort cause. 2013-10-22 14:03:09 +02:00
Simone Bordet dcbc0d9a21 Merged branch 'master' into 'jetty-9.1'. 2013-10-22 13:34:06 +02:00
Simone Bordet 1ce2ec0007 420039 - BufferingResponseListener continues processing after
aborting request.
2013-10-22 13:33:19 +02:00
Simone Bordet 41eed8f836 419904 - Data corruption on proxy PUT requests.
Fixed InputStreamContentProvider to not reuse the byte[] to read from
the stream.
2013-10-22 12:40:32 +02:00
Simone Bordet eaefd17652 420012 - Improve ProxyServlet.Transparent configuration in case prefix="/". 2013-10-21 22:41:39 +02:00
Simone Bordet 0c80567c12 Using StandardCharset fields instead of Charset.forName(). 2013-10-21 16:14:18 +02:00
Simone Bordet 208382b07d Removed test dependencies on Ning's and Apache's HTTP client. 2013-10-21 11:27:23 +02:00
Simone Bordet 5cc0247a67 Merged branch 'master' into 'jetty-9.1'. 2013-10-21 10:49:15 +02:00
Simone Bordet 4b2756c4b0 419950 - Provide constructor for StringContentProvider that takes
Charset.
2013-10-21 10:48:34 +02:00
Simone Bordet df209b7b70 419901 - Client always adds extra user-agent header.
Fixed handling of the user agent header.
2013-10-21 10:42:41 +02:00
Simone Bordet 88541bef2f Merged branch 'master' into 'jetty-9.1'. 2013-10-21 10:41:01 +02:00
Simone Bordet 9fd27b2f8b 419901 - Client always adds extra user-agent header.
Added test case.
2013-10-21 10:39:37 +02:00
Simone Bordet 7520389c91 419901 - Client always adds extra user-agent header.
Improved test case.
2013-10-21 10:39:06 +02:00
Simone Bordet b46af29a42 419901 - Client always adds extra user-agent header.
Added test case.
2013-10-21 10:28:34 +02:00
Greg Wilkins c44537fca8 419899 Do not wrap SSL Exception as EoFException 2013-10-21 16:29:20 +11:00
Simone Bordet 2d6190da59 Refactored class Fields to a better API. 2013-10-18 13:55:49 +02:00
Simone Bordet c1832b29fb Merged branch 'master' into 'jetty-9.1'. 2013-10-17 12:37:37 +02:00
Simone Bordet 7618826349 419687 - HttpClient's query parameters must be case sensitive.
Modified class Fields to take a boolean parameter that defines
whether it is case sensitive or not, and updated HttpRequest to use
a case sensitive Fields instance for the query parameters.
2013-10-17 12:37:01 +02:00
Simone Bordet e408bd64c7 Improved HttpClient's proxy configuration by using Strings as
included and excluded addresses. This allows to pass in Strings such
as 127.0.0.1/8 or other wildcard formats.
2013-10-17 10:44:39 +02:00
Simone Bordet 45e6ac2a5d Javadocs: clarified that timeouts are in milliseconds. 2013-10-16 17:23:32 +02:00
Simone Bordet 114a95234b Merged branch 'master' into 'jetty-9.1'. 2013-10-16 16:30:04 +02:00
Simone Bordet 45828ee906 418892 - SSL session caching so unreliable it effectively does not
work.

Fixed by making sure that we completely decrypt read bytes.

Before the fix, it was possible that we returned after the decryption
of one TLS frame, while another was still present in the
_encryptedBuffer.
This lead to non-clean closes of the connection, which hampered the
capability of session reuse by clients.

Now we decrypt in a loop and only return if there is nothing more
that we can decrypt.
2013-10-16 16:27:36 +02:00
Greg Wilkins 33b10efcaa Merge remote-tracking branch 'origin/release-9' 2013-10-14 11:12:31 +11:00
Simone Bordet 25d9b8704f 417356 - Add SOCKS support to jetty client.
Big refactoring to allow for additional proxy schemes that work at a
lower level than HTTP.

Introduced client-side ConnectionFactory, and binding that to a
HttpDestination, so that connections to that destination will use the
same ConnectionFactory.

The destination's ConnectionFactory is now initialized from the proxy
configuration and the transport, which is now itself a
ConnectionFactory.

The proxy configuration has also changed becoming polymorphic by
introducing a new ProxyConfiguration.Proxy abstract class,
which is implemented as HTTPProxy and can be implemented in future as
SOCKS4Proxy (and possibly others).
2013-10-08 15:06:39 +02:00
Jan Bartel 8cb1001007 Merge remote-tracking branch 'origin/master' into jetty-9.1 2013-10-01 09:12:43 +10:00
Jan Bartel a6f0883ca3 Remove explicit port number from jetty-client SslBytesClientTest 2013-10-01 09:05:05 +10:00
Jesse McConnell 856a24b65a [maven-release-plugin] prepare for next development iteration 2013-09-30 14:46:09 -05:00
Jesse McConnell f466f03c6a [maven-release-plugin] prepare release jetty-9.0.6.v20130930 2013-09-30 14:46:00 -05:00
Jesse McConnell 0b3f431d27 set version back to 9.0.6-SNAPSHOT 2013-09-30 12:33:06 -05:00
Greg Wilkins 6146f0cc9c cleanup threadpool usage 2013-09-30 14:07:17 +10:00
Jesse McConnell 0525498ad3 [maven-release-plugin] prepare for next development iteration 2013-09-19 15:06:31 -05:00
Jesse McConnell c05a725db6 [maven-release-plugin] prepare release jetty-9.0.6.v20130919 2013-09-19 15:06:17 -05:00
Joakim Erdfelt 5c72f6975a [maven-release-plugin] prepare for next development iteration 2013-09-16 11:06:25 -07:00
Joakim Erdfelt 9d26e0b32a [maven-release-plugin] prepare release jetty-9.1.0.M0 2013-09-16 11:06:18 -07:00
Joakim Erdfelt e53029ac8e [maven-release-plugin] rollback the release of jetty-9.1.0.M0 2013-09-16 10:41:04 -07:00
Joakim Erdfelt 07abfa0c5d [maven-release-plugin] prepare release jetty-9.1.0.M0 2013-09-16 10:25:54 -07:00
Joakim Erdfelt b353686608 Reverting back to SNAPSHOTS 2013-09-16 10:00:18 -07:00
Greg Wilkins 9677f6e863 [maven-release-plugin] prepare release jetty-9.1.0.M0 2013-09-17 01:03:16 +10:00
Greg Wilkins 070ce9dd22 Merge remote-tracking branch 'origin/master' into jetty-9.1
Conflicts:
	jetty-start/src/main/java/org/eclipse/jetty/start/Main.java
	jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java
2013-09-09 15:41:17 +10:00
Mikhail Mazursky 767faece5c [Bug 415999] Fix some of FindBugs warnings
Mostly not closed streams/DB resources are fixed. But also less
important things.

Signed-off-by: Mikhail Mazursky <mikhail.mazursky@gmail.com>
2013-09-09 00:24:31 -04:00
Simone Bordet 3cdf4dece1 Refactored some behaviour to base classes to ease the FCGI
implementation, and taken the chance to remove redundant code.
2013-09-07 00:36:31 +02:00
Simone Bordet 4663fa4992 Renamed "Empty" inner classes to "Adapter" to comply with the rest of
the codebase.
2013-09-04 13:15:23 +02:00
Simone Bordet 3be5670448 413387 - onResponseHeaders is not called multiple times when multiple
redirects occur.

Refactored the redirection code into HttpRedirector to ease
applications that need to access the redirect URI and then redirect.
2013-09-04 12:57:02 +02:00
Simone Bordet e65f21634d 415047 - Create URIs lazily in HttpClient.
URIs are now created lazily, although a call to Request.getURI() is
made anyway for each request sending (and therefore the URI is
created anyway for each send). However, we save creating multiple
URIs in case the scheme, path, query or params are changed before
sending the request.
2013-09-04 09:58:20 +02:00
Simone Bordet f10562f269 Merged branch 'master' into 'jetty-9.1'. 2013-09-03 10:41:15 +02:00
Simone Bordet 78c322af8e 416314 - jetty async client wrong behaviour for HEAD Method + Redirect.
Fixed redirect behavior based on
http://greenbytes.de/tech/tc/httpredirects/.
2013-09-03 10:34:30 +02:00
Simone Bordet 5e3322cd11 Removed unused dependencies. 2013-08-30 16:30:14 +02:00
Jesse McConnell ac30f5c9bd update other jetty mods to new format 2013-08-29 16:39:28 -05:00
Joakim Erdfelt 2e94149ea3 Merge branch 'jetty-9.1' into jetty-9.1-altstart 2013-08-23 11:49:41 -07:00
Jesse McConnell 725e405dac first pass for mod files for distribution 2013-08-22 11:53:58 -05:00
Greg Wilkins 59540abeda Merge remote-tracking branch 'origin/master' into jetty-9.1
Conflicts:
	jetty-server/src/main/java/org/eclipse/jetty/server/HttpOutput.java
	jetty-util/src/main/java/org/eclipse/jetty/util/IteratingCallback.java
2013-08-22 22:58:58 +10:00
Simone Bordet c0ed8375d3 Removed unnecessary hack to determine the logger name. 2013-08-22 12:20:18 +02:00
Simone Bordet 8f41e33938 Improved idle timeout mechanism. 2013-08-22 12:17:13 +02:00
Thomas Becker f11d9ba4d6 Remove HttpStalledServerConnectionTest 2013-08-21 10:43:07 +02:00
Jan Bartel c80100b4a9 [maven-release-plugin] prepare for next development iteration 2013-08-15 19:13:27 +10:00
Jan Bartel e7e7e45500 [maven-release-plugin] prepare release jetty-9.0.5.v20130815 2013-08-15 19:13:13 +10:00
Jan Bartel 716430bb03 [maven-release-plugin] rollback the release of jetty-9.0.5.v20130815 2013-08-15 18:03:49 +10:00
Jan Bartel 3d13c15d35 [maven-release-plugin] prepare release jetty-9.0.5.v20130815 2013-08-15 17:22:03 +10:00
Jan Bartel 7947b35134 Reset version for rerun of 9.0.5 2013-08-15 16:47:03 +10:00
Joakim Erdfelt ffad720991 Fixing Javadoc errors that JDK 1.7 complains about 2013-08-14 11:50:07 -07:00
Joakim Erdfelt 6572dfae27 Fixing javadoc in jetty-client that JDK 1.7 complains about 2013-08-14 11:05:34 -07:00
Simone Bordet 34032552ea Avoid boxing of primitive int variables in logging statements. 2013-08-14 14:33:05 +02:00
Thomas Becker ed3d168496 fix HttpReceiver typo in javadoc 2013-08-14 12:17:23 +02:00
Jesse McConnell 4383c9042d [maven-release-plugin] prepare for next development iteration 2013-08-13 14:20:56 -05:00
Jesse McConnell 160d34ec23 [maven-release-plugin] prepare release jetty-9.0.5.v20130813 2013-08-13 14:20:47 -05:00
Thomas Becker fffdd6b2fa Connection javadoc fix 2013-08-13 18:27:06 +02:00
Simone Bordet 6019a37064 Merged branch 'master' into 'jetty-9.1'. 2013-08-13 16:25:04 +02:00
Simone Bordet 759c7096b2 414972 - HttpClient may read bytes with pre-tunnelled connection.
Now the receiver checks whether the connection is closed, and returns
immediately if it is without "stealing" the bytes to the tunnelled
connection.
2013-08-13 16:01:16 +02:00
Simone Bordet d86ceaf790 HttpClient optimizations.
HttpConnectionPool now puts "hot" idle connection in the front of a deque,
rather than at the end of a queue, so that the hotter they are the more they
are used.

HttpRequest is now initialized with better defaults so that
HttpConnection.normalizeRequest() has less work to do.
This reduced the number of branches to be executed for each request.

HttpDestination now produces less garbage by using Jetty's BlockingArrayQueue
instead of Java's LinkedBlockingQueue.

HttpClient has now a bigger response buffer, 16 KiB, by default.
2013-08-05 19:36:19 +02:00
Simone Bordet 8c2be70330 Merged branch 'master' into 'jetty-9.1'. 2013-07-25 17:11:09 +02:00
Simone Bordet 89977cdab1 Completed a couple of TODOs. 2013-07-25 16:40:48 +02:00
Simone Bordet 743c78cc0c 412846 - jetty Http Client Connection through Proxy is failing with Timeout.
The problem was due to the fact that the server replied with HTTP/1.0
to the CONNECT request; because of this, the parser was not set in the
"head response mode".

Now we are setting the parser in the head response mode also if the
request method is a CONNECT.
2013-07-25 16:38:22 +02:00
Simone Bordet ee3c249579 Merged branch 'jetty-7' into 'jetty-8'. 2013-07-25 16:08:58 +02:00
Simone Bordet 3b18490ead 409028 - Jetty HttpClient does not work with proxy CONNECT method.
The problem was due to the fact that the server replied with HTTP/1.0
to the CONNECT request; because of this, the parser was set as non
persistent, and the tunnel was immediately closed.

Now we are setting the parser as persistent if the method is a CONNECT,
no matter what HTTP version the server specifies.
2013-07-25 16:08:02 +02:00
Jan Bartel 1d77a139fd Merge remote-tracking branch 'origin/master' into jetty-9.1 2013-07-25 23:06:33 +10:00
Jan Bartel 50a67eac6a Merge remote-tracking branch 'origin/jetty-8'
Conflicts:
	jetty-client/src/main/java/org/eclipse/jetty/client/HttpExchange.java
	jetty-client/src/test/java/org/eclipse/jetty/client/IdleTimeoutTest.java
	jetty-http/src/main/java/org/eclipse/jetty/http/HttpGenerator.java
2013-07-25 13:22:14 +10:00
Jan Bartel 72b077921d Merge remote-tracking branch 'origin/jetty-7' into jetty-8 2013-07-25 11:26:35 +10:00
Simone Bordet f4a41efaad Merged branch 'master' into 'jetty-9.1'. 2013-07-24 11:21:36 +02:00
Simone Bordet 0f702624a3 410668 - HTTP client should support the PATCH method.
Modified the Request interface to add method(String) so that
additional HTTP methods (such as from WebDAV) can be used.
2013-07-24 10:33:42 +02:00
Simone Bordet 7b4ebc270c Merged branch 'master' into 'jetty 9.1'. 2013-07-23 18:44:45 +02:00
Simone Bordet 108aa247b4 412814 - HttpClient calling CompleteListener.onComplete() twice.
The problem was stemming from the HttpSender completing the response,
but the response was actually completed by HttpReceiver, resulting in the
double call to onComplete().

Now HttpSender checks whether it was able to complete the response, and
only in that case calls the onComplete() callback.
2013-07-23 18:40:46 +02:00
Simone Bordet f62c72c02b Fixed compilation error. 2013-07-23 17:28:51 +02:00
Simone Bordet 1c95bf9876 Code cleanups. 2013-07-23 16:47:03 +02:00
Simone Bordet d0f0dedf20 413531 - Introduce pluggable transports for HttpClient.
Merge of the branch 'http_client_transport' is now complete,
and the implementation is sound for the HTTP transport.
A basic implementation for the SPDY transport exists, but needs
improvements.
2013-07-23 16:08:56 +02:00
Simone Bordet a1032465b8 Improved documentation. 2013-07-23 15:53:35 +02:00
Simone Bordet 55c204b3ba Fixed InputStreamContentProvider.hasNext() to be idempotent until next() is called. 2013-07-23 15:53:35 +02:00
Simone Bordet beee37e96a Moved HttpClientTransport SPDY implementation in its own module under the SPDY project. 2013-07-23 15:53:35 +02:00
Simone Bordet af06b25538 Javadocs. 2013-07-23 15:53:35 +02:00
Simone Bordet b82444e3d2 Improved HttpSender.sendHeaders() and sendContent() methods, separating HttpContent and the callbacks. 2013-07-23 15:53:35 +02:00
Simone Bordet 64a8811a5b Proceeding only if expecting a 100-Continue response. 2013-07-23 15:50:51 +02:00
Simone Bordet bf47119109 Improved exception handling in HttpSender. 2013-07-23 15:50:51 +02:00
Simone Bordet 1fa4a47f1d Added debug code for terminal chunk bug. 2013-07-23 15:50:51 +02:00
Simone Bordet b246d70103 Updated HttpClient code to Jetty 9.1 after merge. 2013-07-23 15:50:51 +02:00
Simone Bordet a4c63caf26 Working draft of the abstraction of HttpClient transport. 2013-07-23 15:50:51 +02:00
Simone Bordet 3b7322f53b Merged branch 'master' into 'jetty-9.1'. 2013-07-23 10:01:17 +02:00
Simone Bordet 0aa2a5b6bb 411844 - ArrayIndexOutOfBoundsException on wild URL.
URLs like /path?= are now handled correctly.
2013-07-22 17:22:16 +02:00
Greg Wilkins b8f7637e7d Merge remote-tracking branch 'origin/master' into jetty-9.1 2013-07-22 23:32:04 +10:00
Simone Bordet 762e4ba4c3 413113 - Inconsistent Request.getURI() when adding parameters via Request.param().
Fixed by rebuilding the URI when a call to param() is made.
2013-07-16 21:50:22 +02:00