facebook/php-webdriver — pull request #33 by OniOni (2012-05-18 20:44:04+00:00)
Title: Error with some selenium servers and -1 content-length 

When sending a POST request, and not sending any data. Curl sets content-length to -1. This makes some selenium servers hang and makes the test fail.
This fix just sets the content-length to 0 if the request being built is of type POST and we are appending no post fields.

This is a little hacky. The real question is, is curl wrong for setting the content-length to -1 or is the server faulty for hanging on request with a -1 content-length.