Skip to content

Commit 62d4118

Browse files
authored
Merge pull request #11 from jstolp/add-content-length-0-on-start-transaction
Adding Content-Length: 0 Head on PUT start transaction call
2 parents 0be04ba + 8a0c302 commit 62d4118

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/SignhostClient.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,12 @@ public function performRequest(string $endpoint, string $method, $data = null, $
9090
if ("GET" === $method || "HEAD" === $method && !isset($filePath)) {
9191
unset($headers[0]); // unset Content-Type
9292
}
93-
93+
94+
// for start transaction, SignHost will require the content-lenth: 0 header.
95+
if (false !== strpos($endpoint, 'start')) {
96+
$headers[] = "Content-Length: 0";
97+
}
98+
9499
// Initialize a cURL session
95100
return $this->performCURLRequest(
96101
$method,

0 commit comments

Comments
 (0)