This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年09月27日 16:08 by ABR, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (4) | |||
|---|---|---|---|
| msg171379 - (view) | Author: ABR (ABR) | Date: 2012年09月27日 16:08 | |
When attempting to use basic auth over https with a server that sends 401 and closes the connection as soon as the headers missing auth are received, the process aborts with a broken pipe when (presumably) trying to send the POST body.
session = requests.session(auth=(USER, PASSWORD), verify=False)
resp = session.post('https://foo.com/something')
--> requests.exceptions.ConnectionError: [Errno 32] Broken pipe
|
|||
| msg171408 - (view) | Author: Thomas Lee (thomaslee) (Python committer) | Date: 2012年09月28日 06:47 | |
Thanks ABR. You may be better off raising a ticket against requests (https://github.com/kennethreitz/requests). I'm assuming what you want to happen here is for the session.post() call to return the 401 response without raising an exception. Perfectly reasonable, but to the best of my knowledge the "requests" library isn't in Python's standard library -- and so this is not the place to get it fixed :) |
|||
| msg171440 - (view) | Author: ABR (ABR) | Date: 2012年09月28日 11:34 | |
If that's where the bug is. I forgot to mention this issue seems identical to 5542 (http://bugs.python.org/issue5542), but for https. The fix there was in the underlying url/httplib. |
|||
| msg392258 - (view) | Author: Irit Katriel (iritkatriel) * (Python committer) | Date: 2021年04月28日 21:03 | |
Issue5542 was fixed, so if it's the same thing this is also fixed. If it's not the same thing, then python 2.7 is past EOL so please create a new issue if you can reproduce this problem in 3.8+. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:36 | admin | set | github: 60266 |
| 2021年04月28日 21:03:55 | iritkatriel | set | status: open -> closed nosy: + iritkatriel messages: + msg392258 resolution: out of date stage: resolved |
| 2012年09月28日 11:34:16 | ABR | set | messages: + msg171440 |
| 2012年09月28日 06:47:35 | thomaslee | set | nosy:
+ thomaslee messages: + msg171408 |
| 2012年09月27日 16:08:14 | ABR | create | |