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

Digest auth does not respect redirects #1439

Closed
max-mapper opened this issue Feb 20, 2015 · 1 comment
Closed

Digest auth does not respect redirects #1439

max-mapper opened this issue Feb 20, 2015 · 1 comment
Labels

Comments

@max-mapper
Copy link

If you try and use the built-in Digest auth strategy against a URI, but the server's 2nd response includes a location header (in my case it was heritrix from this docker container which responded with a 317 redirect via location header) request ignores the redirect

I think it might be the code here failing to check for the location header but I could be wrong:

request/lib/redirect.js

Lines 62 to 69 in 8aede67

} else if (response.statusCode === 401) {
var authHeader = request._auth.onResponse(response)
if (authHeader) {
request.setHeader('authorization', authHeader)
redirectTo = request.uri
}
}
return redirectTo

@stale
Copy link

stale bot commented Nov 23, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 23, 2018
@stale stale bot closed this as completed Nov 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant