[issue12541] Accepting Badly formed headers in urllib HTTPBasicAuth

2011-08-09 Thread Alex Leon
Alex Leon added the comment: It could have a 2 phase regex match. We match the first one, and if it fails, match the second and produce a warning. I think producing a warning is a good idea, as it allows the programmer to know that the implementation of basic auth they are trying to connect

[issue12541] Accepting Badly formed headers in urllib HTTPBasicAuth

2011-08-03 Thread Alex Leon
Alex Leon added the comment: For some reason a caret went missing in the regex fix. It should read 'realm=(["\']?)([^"\']*)\\2', re.I) -- ___ Python tracker <

[issue12541] Accepting Badly formed headers in urllib HTTPBasicAuth

2011-07-12 Thread Alex Leon
New submission from Alex Leon : It looks like some servers using basic authentication don't include quotes around the realm (example https://api.connect2field.com) as required by rfc 2617. urllib wont handle these requests and silently fails, but a simple change to the reg