Encode {PROXY-,}BASIC-AUTHORIZATION using the default external format#153
Encode {PROXY-,}BASIC-AUTHORIZATION using the default external format#153phoe wants to merge 1 commit intoedicl:masterfrom
Conversation
|
I don't think that using From reading https://datatracker.ietf.org/doc/html/rfc7617, I gather that the character set for the credentials is defined by the server's |
|
IIUC, RFC7617 requires something else in the loop that makes the choice about the encoding to choose - in particular, if there's no previous HTTP 401, there's no way to figure out the encoding to use except "guess". Sure, I can implement and document
How do you want to check this? Verify if the credentials are encodable in Latin-1 before actually sending them? |
|
Also, "non-ASCII credentials" is poorly specified - e.g. |
I believe that HTTP headers are encoded as US-ASCII in general, so a check would have to verify that. I'm not entirely sure about the check, however, because it could break existing code that just blindly worked for some reason. On the other hand, it has been a wee while since I encountered Latin-1 as character set in the wild (which is what |
|
The headers are going to be US-ASCII, it's not a problem. But basic authorization uses base64, so the question is what actually hides underneath that layer - Latin-1, UTF-8, or something actually else. Defaulting to UTF-8 would break Drakma for people whose code currently assumes that authorization always uses Latin-1. I'd go for |
Fixes #152
Also fixed an inconsistency between the docs XML/HTML files.