Skip to content

DigestAuthorizationHeader doesn't use comma separator for Authorization header #115

@TheAsteroid

Description

@TheAsteroid

The DigestAuthorizationHeader uses a space as credential separator for both building and parsing, while the RFC examples use a comma followed by a space: https://httpwg.org/specs/rfc7616.html#rfc.section.3.9.1

I believe the following changes should be made:

  • DigestAuthorizationHeader.AppendField should use $", {fn}=\"{fv}\"" (taking into account that the first field shouldn't have the comma prefixed).
  • DigestAuthorizationHeader.Create should set the CredentialsDelimiter in the AuthorizationHeader options to ", " instead of " ".

I can create a PR, but it would be a breaking change, unless it's made backwards compatible with the space-only delimiter.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions