Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Commit bbcb697

Browse files
committed
Merge branch 'gabrielpreston-master'
2 parents f666d1d + 98894fc commit bbcb697

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

lib/remote/HttpCommandExecutor.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,16 @@ public function execute(WebDriverCommand $command) {
184184
}
185185

186186
curl_setopt($this->curl, CURLOPT_URL, $this->url . $url);
187-
curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, $http_method);
187+
188+
// https://github.com/facebook/php-webdriver/issues/173
189+
switch ($command->getName()) {
190+
case DriverCommand::NEW_SESSION:
191+
curl_setopt($this->curl, CURLOPT_POST, 1);
192+
break;
193+
default:
194+
curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, $http_method);
195+
}
196+
188197
$encoded_params = null;
189198
if ($http_method === 'POST' && $params && is_array($params)) {
190199
$encoded_params = json_encode($params);

0 commit comments

Comments
 (0)