Can set accept-language header but not Connection header? PhantomJS (Selenium Webdriver with Python) Can set accept-language header but not Connection header? PhantomJS (Selenium Webdriver with Python) selenium selenium

Can set accept-language header but not Connection header? PhantomJS (Selenium Webdriver with Python)


Looks like the default header for phantomjs connection is Keep-alive, the site you are using to view headers does not show the Connection header, even when not using PhantomJS. If you look at your request using Fiddler, you can see that it has the connection keep-alive header

GET /headers HTTP/1.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/538.1 (KHTML, like Gecko) PhantomJS/2.1.1 Safari/538.1

Connection: Keep-Alive

Accept-Encoding: gzip, deflateAccept-Language: en-US,*Host: www.httpbin.org