Skip to content

Commit

Permalink
Follow up to the activity in Issue SeleniumHQ#6452
Browse files Browse the repository at this point in the history
Sets proper 'Accept' request header so that Python bindings work with some old WebDriver implementations that reply 404 to requests with no 'Accept' set.

Signed-off-by: Luke Inman-Semerau <luke.semerau@gmail.com>
  • Loading branch information
sevaseva authored and lukeis committed Nov 21, 2013
1 parent 75bf44b commit 518b926
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion py/selenium/webdriver/remote/remote_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,8 @@ def _request(self, url, data=None, method=None):
headers["Connection"] = "Keep-Alive"
headers[method] = parsed_url.path
headers["User-Agent"] = "Python http auth"
headers["Content-type"] = "text/html;charset=\"UTF-8\""
headers["Content-type"] = "application/json;charset=\"UTF-8\""
headers["Accept"] = "application/json"
headers["Connection"] = "keep-alive"

# for basic auth
Expand Down

0 comments on commit 518b926

Please sign in to comment.