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

Downloader: Treat 502 as recoverable HTTP error. #23378

Closed
Closed
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 @@ -203,7 +203,6 @@ URLConnection connect(
throw new IOException(describeHttpResponse(connection));
} else if (code < 500 // 4xx means client seems to have erred quoth RFC7231 § 6.5
|| code == 501 // Server doesn't support function quoth RFC7231 § 6.6.2
|| code == 502 // Host not configured on server cf. RFC7231 § 6.6.3
|| code == 505) { // Server refuses to support version quoth RFC7231 § 6.6.6
// This is a permanent error so we're not going to retry.
readAllBytesAndClose(connection.getErrorStream());
Expand All @@ -214,7 +213,7 @@ URLConnection connect(
}
throw new UnrecoverableHttpException(describeHttpResponse(connection));
} else {
// However we will retry on some 5xx errors, particularly 500 and 503.
// However we will retry on some 5xx errors, particularly 500, 502 and 503.
throw new IOException(describeHttpResponse(connection));
}
} catch (UnrecoverableHttpException | FileNotFoundException e) {
Expand Down
Loading