1
0
mirror of https://github.com/square/okhttp.git synced 2025-12-25 00:01:02 +03:00

Strip auth headers when redirected to another host.

These are potentially private and we don't want to leak them to another
host, regardless of whether they're created by the calling application or
by the Authenticator.
This commit is contained in:
Jesse Wilson
2014-05-19 23:18:01 -04:00
parent 3d0d59c2b7
commit ed70981925
5 changed files with 16 additions and 13 deletions

View File

@@ -357,7 +357,7 @@ public class HttpURLConnectionImpl extends HttpURLConnection {
throw new HttpRetryException("Cannot retry streamed HTTP body", responseCode);
}
if (!httpEngine.sameConnection(followUp)) {
if (!httpEngine.sameConnection(followUp.url())) {
httpEngine.releaseConnection();
}