Expose "WWW-Authenticate" header to CORS requests - #641
Open
reinert wants to merge 1 commit into
Open
Conversation
Digest auth endpoint is missing the "Access-Control-Expose-Headers: WWW-Authenticate" header in order to correctly support CORS requests. Without it, the browser doesn't allow the client to get the value of the WWW-Authenticate header.
s3anw3
added a commit
to seedvector/httpcan
that referenced
this pull request
Aug 11, 2026
…uth POST (#15) Fixes #15. - digest: support SHA-512-256 (RFC 7616) alongside MD5/SHA-256/SHA-512; refactor calculate_digest_response to use a digest_hash_hex helper, removing the 5x duplicated algorithm match arms (postmanlabs/httpbin#697). - CORS: expose WWW-Authenticate so browser clients can read the 401 challenge (postmanlabs/httpbin#641). - basic-auth and hidden-basic-auth: accept POST on all four variants (postmanlabs/httpbin#365, #607). Adds test basic_auth_accepts_post. SHA-512-256 verified end-to-end via curl --digest (algorithm=SHA-512-256 -> 200). (#592 qop-omit deferred.) Note: curl does not implement SHA-512 digest auth, so SHA-512 is not testable via curl; its server-side hash path is unchanged by the refactor.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Digest auth endpoint is missing the "Access-Control-Expose-Headers: WWW-Authenticate" header in order to correctly support CORS requests. Without it, the browser doesn't allow the client to get the value of the WWW-Authenticate header.