Open meejah opened 2 years ago
The error is something like this (note that the password after the colon is now gone). This is if you passed in something like DecodedURL.from_text(u"https://username:password@example.com")
raise InvalidCodepoint('Codepoint {0} at position {1} of {2} not allowed'.format(_unot(cp_value), pos+1, repr(label)))
idna.core.InvalidCodepoint: Codepoint U+003A at position 9 of u'username:@example'' not allowed
If a
DecodedURL
with a username/password in it is passed to a treq API, an error results about encoding a colon character (and the password is removed). (I can followup with the traceback but I don't have it immediately handy).To make such a URL work, one can simply pass
auth=url.userinfo
to thetreq
reqeuest (and.replace(userinfo=())
to remove the username/password from URL) so it might be nice to have that as "a feature" intreq
itself. That is, take out the userinfo from theDecodedURL
and use it for authentication.