fix: process headers correctly in Digest Auth and other updates #4494
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's changed
This PR includes a couple of updates to how the resultant headers were computed for Digest Authorization, ensuring the request is transmitted in the expected format:
MD5-sess
) while hashing username, realm and password.qop
is set toauth-init
. For content types likemultipart/form-data
where the request body is not a string, it falls back to an empty string while hashing for now.Additionally, it includes the following changes:
www-authenticate
header received from the server in the initial response in a case-insensitive manner. Previously, if the server responded with theWWW-Authenticate
header, the initial response would be marked with an unexpected response sincewww-authenticate
was referred to straightaway.Disable Retrying Requests
for the time being until a mechanism is in place to handle failed requests gracefully in such a case. CLI will still support this.Notes to reviewers
Ensure the request succeeds every time. Also, export the collection and run it via the CLI. Specify
disableRetry: true
in the exported collection underauth
for the request and observe the request failing with a suitable message.