Skip to content

Conversation

@mikeyhew
Copy link
Contributor

I couldn't figure out why my "username:password" strings kept failing to parse
into a Basic auth header, until I realized that the implementation expects
it to be base-64 encoded, which would be the case if it was coming from HTTP.
I'm not sure if this is the best place to document it, but hopefully it will
make it more clear for other people / me when I forget.

Perhaps a better approach would be to document somewhere that all FromStr impls for
headers are there for parsing request headers, and not really for creating them.

…kes a base-64 encoded string

I couldn't figure out why my "username:password" strings kept failing to parse
into a Basic auth header, until I realized that the implementation expects
it to be base-64 encoded, which would be the case if it was coming from HTTP.
I'm not sure if this is the best place to document it, but hopefully it will
make it more clear for other people / me when I forget.

Perhaps a better approach would be to document somewhere that all `FromStr` impls for
headers are there for parsing request headers, and not really for creating them.
@seanmonstar seanmonstar merged commit e6647aa into hyperium:master Feb 20, 2018
@seanmonstar
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants