-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change HTTPConnection.getresponse() to return urllib3.HTTPResponse
Co-authored-by: Seth Michael Larson <sethmichaellarson@gmail.com>
- Loading branch information
1 parent
b14ad35
commit 279b9c9
Showing
13 changed files
with
404 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Modified ``urllib3.HTTPConnection.getresponse`` to return an instance of ``urllib3.HTTPResponse`` instead of ``http.client.HTTPResponse``. | ||
|
||
Removed ``urllib3.HTTPResponse.from_httplib``. |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
diff --git a/tests/test_lowlevel.py b/tests/test_lowlevel.py | ||
index 859d07e8..91fbce7c 100644 | ||
--- a/tests/test_lowlevel.py | ||
+++ b/tests/test_lowlevel.py | ||
@@ -20,7 +20,7 @@ def echo_response_handler(sock): | ||
) % (len(request_content), request_content) | ||
sock.send(text_200) | ||
|
||
- | ||
+@pytest.mark.xfail | ||
def test_chunked_upload(): | ||
"""can safely send generators""" | ||
close_server = threading.Event() | ||
@@ -35,7 +35,7 @@ def test_chunked_upload(): | ||
assert r.status_code == 200 | ||
assert r.request.headers["Transfer-Encoding"] == "chunked" | ||
|
||
- | ||
+@pytest.mark.xfail | ||
def test_chunked_encoding_error(): | ||
"""get a ChunkedEncodingError if the server returns a bad response""" | ||
|
||
@@ -59,7 +59,7 @@ def test_chunked_encoding_error(): | ||
requests.get(url) | ||
close_server.set() # release server block | ||
|
||
- | ||
+@pytest.mark.xfail | ||
def test_chunked_upload_uses_only_specified_host_header(): | ||
"""Ensure we use only the specified Host header for chunked requests.""" | ||
close_server = threading.Event() | ||
@@ -77,7 +77,7 @@ def test_chunked_upload_uses_only_specified_host_header(): | ||
assert expected_header in r.content | ||
assert r.content.count(b"Host: ") == 1 | ||
|
||
- | ||
+@pytest.mark.xfail | ||
def test_chunked_upload_doesnt_skip_host_header(): | ||
"""Ensure we don't omit all Host headers with chunked requests.""" | ||
close_server = threading.Event() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.