summaryrefslogtreecommitdiffstats
path: root/Lib/urllib
Commit message (Collapse)AuthorAgeFilesLines
* bpo-30500: urllib: Simplify splithost by calling into urlparse. (#1849) (#2290)Victor Stinner2017-06-201-1/+1
| | | | | | | | | The current regex based splitting produces a wrong result. For example:: http://abc#@def Web browsers parse that URL as ``http://abc/#@def``, that is, the host is ``abc``, the path is ``/``, and the fragment is ``#@def``. (cherry picked from commit 90e01e50ef8a9e6c91f30d965563c378a4ad26de)
* bpo-29976: urllib.parse clarify '' in scheme values. (GH-984) (GH-1693)Senthil Kumaran2017-05-211-11/+19
| | | (cherry picked from commit 906f5330b9c9a74cad1cf27fddaf77e99dff9edd)
* [3.5] Remove superfluous comment in urllib.error. (GH-1076) (GH-1102)Mariatta2017-04-131-4/+0
| | | (cherry picked from commit 6fab78e9027f9ebd6414995580781b480433e595)
* Remove OSError related comment in urllib.request. (#1071)Senthil Kumaran2017-04-101-1/+0
| | | (cherry picked from commit 6dfcc81f6b1c82a71a1c876e14424fb8b3573447)
* Remove invalid comment in urllib.request.(#1056)Senthil Kumaran2017-04-091-6/+2
| | | (cherry picked from commit a2a9ddd923a849124bdd1c484f70f02df6fde0e9)
* correct parse_qs and parse_qsl test case descriptions. (#968) (#998)Senthil Kumaran2017-04-051-13/+17
| | | (cherry picked from commit 257b980b316a5206ecf6c23b958e2b7c4df4f3de)
* Issue #29142: Fix suffixes in no_proxy handling in urllib.Xiang Zhang2017-01-091-0/+1
| | | | | | In urllib.request, suffixes in no_proxy environment variable with leading dots could match related hostnames again (e.g. .b.c matches a.b.c). Patch by Milan Oberkirch.
* Issue #25895: Enable WebSocket URL schemes in urllib.parse.urljoinBerker Peksag2016-09-161-2/+3
| | | | Patch by Gergely Imreh and Markus Holtermann.
* Issue #22450: Use "Accept: */*" in the default headers for urllib.requestRaymond Hettinger2016-09-091-1/+1
|
* [merge from 3.4] - Prevent HTTPoxy attack (CVE-2016-1000110)Senthil Kumaran2016-07-311-0/+6
|\ | | | | | | | | | | | | Ignore the HTTP_PROXY variable when REQUEST_METHOD environment is set, which indicates that the script is in CGI mode. Issue #27568 Reported and patch contributed by Rémi Rampin.
| * [merge from 3.3] Prevent HTTPoxy attack (CVE-2016-1000110)Senthil Kumaran2016-07-311-0/+7
| |\ | | | | | | | | | | | | | | | | | | Ignore the HTTP_PROXY variable when REQUEST_METHOD environment is set, which indicates that the script is in CGI mode. Issue #27568 Reported and patch contributed by Rémi Rampin.
| | * Prevent HTTPoxy attack (CVE-2016-1000110)Senthil Kumaran2016-07-311-0/+7
| | | | | | | | | | | | | | | | | | | | | Ignore the HTTP_PROXY variable when REQUEST_METHOD environment is set, which indicates that the script is in CGI mode. Issue #27568 Reported and patch contributed by Rémi Rampin.
* | | Issue #17214: Percent-encode non-ASCII bytes in redirect targetsMartin Panter2016-05-161-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some servers send Location header fields with non-ASCII bytes, but "http. client" requires the request target to be ASCII-encodable, otherwise a UnicodeEncodeError is raised. Based on patch by Christian Heimes. Python 2 does not suffer any problem because it allows non-ASCII bytes in the HTTP request target.
* | | Issue #14132: Fix redirect handling when target is just a query stringMartin Panter2016-05-161-1/+1
| | |
* | | Issue #26892: Honor debuglevel flag in urllib.request.HTTPHandler.Senthil Kumaran2016-05-131-0/+1
| | | | | | | | | | | | Patch contributed by Chi Hsuan Yen.
* | | Fix typos in comments, documentation and test method namesMartin Panter2016-05-081-1/+1
| | |
* | | Issue #26864: Fix case insensitivity and suffix comparison with no_proxyMartin Panter2016-04-301-2/+6
| | | | | | | | | | | | Patch by Xiang Zhang.
* | | Issue #26804: urllib.request will prefer lower_case proxy environment variablesSenthil Kumaran2016-04-251-10/+34
| | | | | | | | | | | | | | | | | | over UPPER_CASE or Mixed_Case ones. Patch contributed by Hans-Peter Jansen. Reviewed by Martin Panter and Senthil Kumaran.
* | | Issue #2202: Fix UnboundLocalError in ↵Berker Peksag2016-03-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | AbstractDigestAuthHandler.get_algorithm_impls Raise ValueError if algorithm is not MD5 or SHA. Initial patch by Mathieu Dupuy.
* | | Issue #12923: Reset FancyURLopener's redirect counter even on exceptionMartin Panter2016-02-041-11/+13
| | | | | | | | | | | | Based on patches by Brian Brazil and Daniel Rocco.
* | | Remove unnecessary test case comment in urllib.parse.py. These are asserted ↵Senthil Kumaran2016-01-261-15/+0
| | | | | | | | | | | | as test cases.
* | | Issue #24021: docstring for urllib.urlcleanup.Robert Collins2015-08-041-0/+1
|\ \ \ | |/ / | | | | | | Patch from Daniel Andrade Groppe and Peter Lovett
| * | Issue #24021: docstring for urllib.urlcleanup.Robert Collins2015-08-041-0/+1
| | | | | | | | | | | | Patch from Daniel Andrade Groppe and Peter Lovett
* | | Issue #13866: add *quote_via* argument to urlencode.R David Murray2015-05-181-14/+15
| | | | | | | | | | | | | | | Patch by samwyse, completed by Arnon Yaari, and reviewed by Martin Panter.
* | | Issue #23887: urllib.error.HTTPError now has a proper repr() representation.Facundo Batista2015-04-221-1/+6
| | |
* | | #7159: generalize urllib prior auth support.R David Murray2015-04-161-18/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fix is a superset of the functionality introduced by the issue #19494 enhancement, and supersedes that fix. Instead of a new handler, we have a new password manager that tracks whether we should send the auth for a given uri. This allows us to say "always send", satisfying #19494, or track that we've succeeded in auth and send the creds right away on every *subsequent* request. The support for using the password manager is added to AbstractBasicAuth, which means the proxy handler also now can handle prior auth if passed the new password manager. Patch by Akshit Khurana, docs mostly by me.
* | | Issue #23703: Fix a regression in urljoin() introduced in 901e4e52b20a.Berker Peksag2015-04-151-2/+1
| | | | | | | | | | | | Patch by Demian Brecht.
* | | Issue #23865: close() methods in multiple modules now are idempotent and moreSerhiy Storchaka2015-04-101-5/+9
|\ \ \ | |/ / | | | | | | | | | robust at shutdown. If needs to release multiple resources, they are released even if errors are occured.
| * | Issue #23865: close() methods in multiple modules now are idempotent and moreSerhiy Storchaka2015-04-101-5/+9
| | | | | | | | | | | | | | | robust at shutdown. If needs to release multiple resources, they are released even if errors are occured.
* | | Issue #23411: Added DefragResult, ParseResult, SplitResult, DefragResultBytes,Serhiy Storchaka2015-04-071-1/+3
| | | | | | | | | | | | | | | ParseResultBytes, and SplitResultBytes to urllib.parse.__all__. Patch by Martin Panter.
* | | (Merge 3.4) Issue #23881: urllib.request.ftpwrapper constructor now closes theVictor Stinner2015-04-071-1/+5
|\ \ \ | |/ / | | | | | | socket if the FTP connection failed to fix a ResourceWarning.
| * | Issue #23881: urllib.request.ftpwrapper constructor now closes the socket ifVictor Stinner2015-04-071-1/+5
| | | | | | | | | | | | the FTP connection failed to fix a ResourceWarning.
* | | Issue #23563: Optimized utility functions in urllib.parse.Serhiy Storchaka2015-03-031-60/+28
| | |
* | | Merge: #23040: Clarify treatment of encoding and errors when component is bytes.R David Murray2014-12-251-4/+5
|\ \ \ | |/ /
| * | #23040: Clarify treatment of encoding and errors when component is bytes.R David Murray2014-12-251-4/+5
| | | | | | | | | | | | Patch by Wojtek Ruszczewski.
* | | merge 3.4Benjamin Peterson2014-12-071-2/+2
|\ \ \ | |/ /
| * | use context's check_hostname attribute rather than the HTTPSHandler ↵Benjamin Peterson2014-12-071-2/+2
| | | | | | | | | | | | check_hostname parameter
| * | backport context argument of urlopen (#22366) for pep 476Senthil Kumaran2014-09-191-1/+9
| | |
* | | Close #19494: add urrlib.request.HTTPBasicPriorAuthHandlerNick Coghlan2014-11-121-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This auth handler adds the Authorization header to the first HTTP request rather than waiting for a HTTP 401 Unauthorized response from the server as the default HTTPBasicAuthHandler does. This allows working with websites like https://api.github.com which do not follow the strict interpretation of RFC, but more the dicta in the end of section 2 of RFC 2617: > A client MAY preemptively send the corresponding Authorization > header with requests for resources in that space without receipt > of another challenge from the server. Similarly, when a client > sends a request to a proxy, it may reuse a userid and password in > the Proxy-Authorization header field without receiving another > challenge from the proxy server. See section 4 for security > considerations associated with Basic authentication. Patch by Matej Cepl.
* | | Issue #22278: Fix urljoin problem with relative urls, a regression observedSenthil Kumaran2014-09-221-1/+5
| | | | | | | | | | | | | | | | | | after changes to issue22118 were submitted. Patch contributed by Demian Brecht and reviewed by Antoine Pitrou.
* | | Issue #22366: urllib.request.urlopen will accept a context object (SSLContext)Senthil Kumaran2014-09-191-1/+9
| | | | | | | | | | | | | | | | | | as an argument which will then used be for HTTPS connection. Patch by Alex Gaynor.
* | | Issue #19524: Fixed resource leak in the HTTP connection when an invalidSerhiy Storchaka2014-09-061-11/+14
|\ \ \ | |/ / | | | | | | response is received. Patch by Martin Panter.
| * | Issue #19524: Fixed resource leak in the HTTP connection when an invalidSerhiy Storchaka2014-09-061-11/+14
| | | | | | | | | | | | response is received. Patch by Martin Panter.
* | | Issue #22118: Switch urllib.parse to use RFC 3986 semantics for the ↵Antoine Pitrou2014-08-211-25/+38
| | | | | | | | | | | | | | | | | | resolution of relative URLs, rather than RFCs 1808 and 2396. Patch by Demian Brecht.
* | | merge from 3.4Senthil Kumaran2014-08-201-18/+2
|\ \ \ | |/ / | | | | | | Fix Issue #8797: Raise HTTPError on failed Basic Authentication immediately. Initial patch by Sam Bull.
| * | Fix Issue #8797: Raise HTTPError on failed Basic Authentication immediately. ↵Senthil Kumaran2014-08-201-18/+2
| | | | | | | | | | | | Initial patch by Sam Bull.
* | | merge 3.4; backout changeset 3435c5865cfc due to buildbot failures. Ref #8797Senthil Kumaran2014-08-161-2/+18
|\ \ \ | |/ /
| * | backout changeset 3435c5865cfc due to buildbot failures. Ref #8797Senthil Kumaran2014-08-161-2/+18
| | |
* | | merge from 3.4Senthil Kumaran2014-08-161-18/+2
|\ \ \ | |/ / | | | | | | Fix Issue #8797: Raise HTTPError on failed Basic Authentication immediately. Initial patch by Sam Bull.
| * | Fix Issue #8797: Raise HTTPError on failed Basic Authentication immediately. ↵Senthil Kumaran2014-08-161-18/+2
| | | | | | | | | | | | Initial patch by Sam Bull.