Created
May 18, 2012 20:34
-
-
Save OniOni/2727469 to your computer and use it in GitHub Desktop.
Diff for making php-webdriver work on saucelabs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/PHPWebDriver/WebDriverBase.php b/PHPWebDriver/WebDriverBase.php | |
index 1f2bc78..c5f0708 100644 | |
--- a/PHPWebDriver/WebDriverBase.php | |
+++ b/PHPWebDriver/WebDriverBase.php | |
@@ -144,6 +144,8 @@ abstract class PHPWebDriver_WebDriverBase { | |
curl_setopt($curl, CURLOPT_POST, true); | |
if ($params && is_array($params)) { | |
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($params)); | |
+ } else { | |
+ curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-length: 0')); | |
} | |
} else if ($http_method == 'DELETE') { | |
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment