Skip to content

Commit

Permalink
Revert "Proper handling HTTP Host header"
Browse files Browse the repository at this point in the history
This reverts commit b095d43.
  • Loading branch information
lukeis committed Sep 15, 2015
1 parent 84ebcca commit e266f9e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions py/selenium/webdriver/remote/remote_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ def __init__(self, remote_server_addr, keep_alive=False, resolve_ip=True):
# Attempt to resolve the hostname and get an IP address.
self.keep_alive = keep_alive
parsed_url = parse.urlparse(remote_server_addr)
self._hostname = parsed_url.hostname
addr = ""
if parsed_url.hostname and resolve_ip:
try:
Expand Down Expand Up @@ -415,8 +414,7 @@ def _request(self, method, url, body=None):
headers = {"Connection": 'keep-alive', method: parsed_url.path,
"User-Agent": "Python http auth",
"Content-type": "application/json;charset=\"UTF-8\"",
"Accept": "application/json",
"Host": self._hostname}
"Accept": "application/json"}
if parsed_url.username:
auth = base64.standard_b64encode('%s:%s' %
(parsed_url.username, parsed_url.password)).replace('\n', '')
Expand Down Expand Up @@ -454,7 +452,6 @@ def _request(self, method, url, body=None):

request.add_header('Accept', 'application/json')
request.add_header('Content-Type', 'application/json;charset=UTF-8')
request.add_header('Host', self._hostname)

if password_manager:
opener = url_request.build_opener(url_request.HTTPRedirectHandler(),
Expand Down

0 comments on commit e266f9e

Please sign in to comment.