detro/ghostdriver — pull request #290 by spake (2013-12-10 03:20:38+00:00)
Title: Added keepAlive option.

There is an issue with the use of the latest version of Selenium with PhantomJS & GhostDriver in that Selenium was [recently changed to use keep-alive for remote connections](https://github.com/SeleniumHQ/selenium/commit/93dc1284534330866238d85521e40dd4de435def), now assuming that the WebDriver connection supports keep-alive and that it can leave the socket open. Unfortunately, by default, keep-alive is disabled in PhantomJS, [creating an issue](https://code.google.com/p/selenium/issues/detail?id=6690) when the two are used together in which GhostDriver closes the HTTP connection while Selenium has requested it remain open.

I've developed a fix in the form of adding a command line argument to PhantomJS that enables keep-alive in GhostDriver. This is the first part of that fix in the form of adding a `keepAlive` option to GhostDriver that can be called from PhantomJS based on the value of the command line argument.

I assume the protocol would be to get this merged to ghostdriver/master, wait for the changes to be added to the PhantomJS repo, and then submit a pull request on the PhantomJS repo for the changes involving the command line argument. Any clarification on the process would be appreciated :smile: