Skip to content

Commit

Permalink
Adding Content-Length: 0 Head on PUT start transaction call
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeroen Stolp committed Jan 6, 2020
1 parent e15e956 commit 8a0c302
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/SignhostClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,12 @@ public function performRequest(string $endpoint, string $method, $data = null, $
if ("GET" === $method || "HEAD" === $method && !isset($filePath)) {
unset($headers[0]); // unset Content-Type
}


// for start transaction, SignHost will require the content-lenth: 0 header.
if (false !== strpos($endpoint, 'start')) {
$headers[] = "Content-Length: 0";
}

// Initialize a cURL session
return $this->performCURLRequest(
$method,
Expand Down

0 comments on commit 8a0c302

Please sign in to comment.