Skip to content

Commit b5f840c

Browse files
author
j.s@google.com
committed
If behind an HTTP proxy, send the full URL in the Host header. Resolves issue 275 (thanks dodysw!)
1 parent 6567eeb commit b5f840c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/atom/http_core.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,10 @@ def _http_request(self, method, uri, headers=None, body_parts=None):
394394
if self.debug:
395395
connection.debuglevel = 1
396396

397-
connection.putrequest(method, uri._get_relative_path())
397+
if connection.host != uri.host:
398+
connection.putrequest(method, str(uri))
399+
else:
400+
connection.putrequest(method, uri._get_relative_path())
398401

399402
# Overcome a bug in Python 2.4 and 2.5
400403
# httplib.HTTPConnection.putrequest adding

0 commit comments

Comments
 (0)