Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CXF-8248 - workaround to get the root cause when the hostname contains an underscore #655

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,9 @@ protected void verifySession(final HttpHost host,
new CXFHttpAsyncResponseConsumer(this, inbuf, responseCallback),
ctx,
callback);
if (exception != null) {
reThrowException();
}
}

protected boolean retrySetHttpResponse(HttpResponse r) {
Expand Down Expand Up @@ -652,13 +655,7 @@ protected synchronized HttpResponse getHttpResponse() throws IOException {
//inbuf = null;

if (exception != null) {
if (exception instanceof IOException) {
throw (IOException)exception;
}
if (exception instanceof RuntimeException) {
throw (RuntimeException)exception;
}
throw new IOException(exception);
reThrowException();
}

throw new SocketTimeoutException("Read Timeout");
Expand All @@ -667,6 +664,16 @@ protected synchronized HttpResponse getHttpResponse() throws IOException {
return httpResponse;
}

private void reThrowException() throws IOException {
if (exception instanceof IOException) {
throw (IOException)exception;
}
if (exception instanceof RuntimeException) {
throw (RuntimeException)exception;
}
throw new IOException(exception);
}

protected void handleResponseAsync() throws IOException {
isAsync = true;
}
Expand Down