|
|
@ -487,12 +487,6 @@ public class HTTPClient {
|
|
|
|
assert !hrequest.expectContinue();
|
|
|
|
assert !hrequest.expectContinue();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
httpResponse = httpClient.execute(httpUriRequest, httpContext);
|
|
|
|
|
|
|
|
} catch (Exception ee) {
|
|
|
|
|
|
|
|
// try again synchronized
|
|
|
|
|
|
|
|
synchronized (httpClient) {
|
|
|
|
|
|
|
|
// without synchronization we get an InterruptedException here very often
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
httpResponse = httpClient.execute(httpUriRequest, httpContext);
|
|
|
|
httpResponse = httpClient.execute(httpUriRequest, httpContext);
|
|
|
|
} catch (IOException e) {
|
|
|
|
} catch (IOException e) {
|
|
|
@ -501,8 +495,6 @@ public class HTTPClient {
|
|
|
|
throw new IOException("Client can't execute: " + e.getMessage());
|
|
|
|
throw new IOException("Client can't execute: " + e.getMessage());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void setHeaders(final HttpUriRequest httpUriRequest) {
|
|
|
|
private void setHeaders(final HttpUriRequest httpUriRequest) {
|
|
|
|
if (headers != null) {
|
|
|
|
if (headers != null) {
|
|
|
|