Skip to content

Commit

Permalink
Merge pull request #11 from jstolp/add-content-length-0-on-start-tran…
Browse files Browse the repository at this point in the history
…saction

Adding Content-Length: 0 Head on PUT start transaction call
  • Loading branch information
steffjenl authored Jan 6, 2020
2 parents 0be04ba + 8a0c302 commit 62d4118
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 62d4118

Please sign in to comment.