| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
The DefaultRequestDirector was letting IOExceptions from closing stale
connections affect new requests. However, it was very common to
received "SSL shutdown failed" exceptions in this case, since an SSL
"close notify" message could not be sent. Now these and other
IOExceptions are ignored so the request can continue with a new
socket.
Bug: 3317717
Change-Id: I72f6f4a8f70aacb8b4c3e93c51e9808742d1a605
|
|
|
|
|
|
|
|
|
| |
android.net.http.DefaultHttpClientTest demonstrates a problem where
half-closed connections get pooled, causing subsequent connections
to timeout.
Change-Id: I7275d99f12eafa28bb2336a3dd67546ffecb4dce
http://b/2612240
|
|\ |
|
| |
| |
| |
| |
| | |
Change-Id: Ic05f450a301d5478ff3a8f03af56ac0c0dbe3620
http://b/3254717
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Even though SoTimeout, TcpNoDelay, and SoLinger can be specified per
request in HttpParams, these values are only set on the underlying
socket in the DefaultRequestDirector when ManagedClientConnection.open
is called to create a new connection. On reused connection, no setting
of Socket options was being done.
There does not seem to be an easy way to fix this without changing one
or more APIs but for the timeout case at least, we can use the fact
that the ManagedClientConnection is an HttpConnection which has a
setSocketTimeout method.
Bug: 3241899
Change-Id: I080147b017b961502b3ba98d40841fea679491eb
|
|
|
|
|
| |
Change-Id: Id3a171f588fb545e14188e69e7bf6f2d4ef25b5c
http://b/3095990
|
|
|
|
|
|
|
|
| |
This needs a comment and an annotation. The original deprecation was
submitted in HTTPCORE-148, in this patch:
https://issues.apache.org/jira/secure/attachment/12376138/changes.txt
Change-Id: I3b4c6e61f03a5f6ffc42ac1f02155f5c58b2e79c
|
|
|
|
|
|
|
|
|
| |
git cherry-pick --no-commit 5648c97be2c515bdafeff3d8a4b07ea0ddc3e357
git cherry-pick --no-commit ffdb1757
git cherry-pick --no-commit 9340bb2a4b5f828b418c0e77492dde148623c938
git cherry-pick --no-commit af5c56d1
Change-Id: Ie910601ca27e1fcff90bbf0db5bd522bab8924f7
|
|
|
|
| |
Change-Id: Idadf71f9935d34f95e7df68a3ffb59e0d8f154b8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DefaultClientConnectionOperator.openConnection was recently changed to
use LayeredSocketFactory.createSocket(Socket, ...) to create an
SSLSocket around a plain java.net.Socket. However, this means code in
LayeredSocketFactory.createSocket(Socket, ...) is called before socket
options such as timeout are set by
DefaultClientConnectionOperator.prepareSocket. However, the default
org.apache.http.conn.ssl.SSLSocketFactory.createSocket(Socket, ...)
performes the SSL handshake to perform hostname verification, meaning
the handshake is performed without timeouts set.
This change to DefaultClientConnectionOperator.openConnection moves
the call prepareSocket to be on the underlying java.net.Socket before
it is has the SSLSocket layered on top of it to prevent hangs during
SSL handshakes.
Change-Id: If705cc1acfe524281ec1338f73eccf7c0f4d1227
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch makes our HTTP client multihoming-aware, so if one server fails for
whatever reason (including timeout), we'll fall back to the next. It's a bit
more complex than the first attempt, but we're hopefully not breaking SSL
connection (incl. checkin) anymore.
Also includes one patch from upstream, in that timeouts are converted from
Java's exception hierarchy to our own exceptions.
Here's an example tcpdump from a fake checkin server with both AAAA and A records,
where the IPv6 connectivity is deliberately broken to demonstrate the effects of
this patch:
11:49:28.202620 IP6 2620:0:105f:a:223:76ff:fe8d:3a3c.37109 > 2001:700:300:1880::2.80: S 24035192:24035192(0) win 5760 <mss 1440,sackOK,timestamp 1110775 0,[|tcp]>
11:49:31.211370 IP6 2620:0:105f:a:223:76ff:fe8d:3a3c.37109 > 2001:700:300:1880::2.80: S 24035192:24035192(0) win 5760 <mss 1440,sackOK,timestamp 1111075 0,[|tcp]>
11:49:37.211186 IP6 2620:0:105f:a:223:76ff:fe8d:3a3c.37109 > 2001:700:300:1880::2.80: S 24035192:24035192(0) win 5760 <mss 1440,sackOK,timestamp 1111675 0,[|tcp]>
11:49:48.216299 IP 74.125.57.33.58205 > 129.241.93.35.80: S 2632654863:2632654863(0) win 5840 <mss 1372,sackOK,timestamp 1112775 0,nop,wscale 1>
11:49:48.216324 IP 129.241.93.35.80 > 74.125.57.33.58205: S 3149921981:3149921981(0) ack 2632654864 win 5792 <mss 1460,sackOK,timestamp 62633484 1112775,nop,wscale 8>
(...)
and then the HTTP connection proceeds as usual.
I intend to push this fix upstream once we get it reviewed and committed locally.
|
|/
|
|
|
|
|
|
| |
past the start of the read buffer.
Fixes internal bug #2183785.
Change-Id: I2a371e88a6816f4c1e237ae4cdb8baade4de66c9
|
|
|
|
|
|
| |
whatever reason"
This reverts commit ceab342827538782a715a10e5030a222700895ce.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(including timeout), we'll fall back to the next.
Also includes one patch from upstream, in that timeouts are converted from
Java's exception hierarchy to our own exceptions.
Here's an example tcpdump from a fake checkin server with both AAAA and A records,
where the IPv6 connectivity is deliberately broken to demonstrate the effects of
this patch:
11:49:28.202620 IP6 2620:0:105f:a:223:76ff:fe8d:3a3c.37109 > 2001:700:300:1880::2.80: S 24035192:24035192(0) win 5760 <mss 1440,sackOK,timestamp 1110775 0,[|tcp]>
11:49:31.211370 IP6 2620:0:105f:a:223:76ff:fe8d:3a3c.37109 > 2001:700:300:1880::2.80: S 24035192:24035192(0) win 5760 <mss 1440,sackOK,timestamp 1111075 0,[|tcp]>
11:49:37.211186 IP6 2620:0:105f:a:223:76ff:fe8d:3a3c.37109 > 2001:700:300:1880::2.80: S 24035192:24035192(0) win 5760 <mss 1440,sackOK,timestamp 1111675 0,[|tcp]>
11:49:48.216299 IP 74.125.57.33.58205 > 129.241.93.35.80: S 2632654863:2632654863(0) win 5840 <mss 1372,sackOK,timestamp 1112775 0,nop,wscale 1>
11:49:48.216324 IP 129.241.93.35.80 > 74.125.57.33.58205: S 3149921981:3149921981(0) ack 2632654864 win 5792 <mss 1460,sackOK,timestamp 62633484 1112775,nop,wscale 8>
(...)
and then the HTTP connection proceeds as usual.
I intend to push this fix upstream once we get it reviewed and committed locally.
|
| |
|
| |
|
| |
|
| |
|
|
|