|
|
|
@ -487,8 +487,12 @@ public class HTTPClient {
|
|
|
|
|
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
|
|
|
|
|
// without synchronization we get an InterruptedException here very often
|
|
|
|
|
try {
|
|
|
|
|
httpResponse = httpClient.execute(httpUriRequest, httpContext);
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
@ -498,6 +502,7 @@ public class HTTPClient {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void setHeaders(final HttpUriRequest httpUriRequest) {
|
|
|
|
|
if (headers != null) {
|
|
|
|
|