Skip to content

Commit ca59f01

Browse files
kelunikNyholm
authored andcommitted
Sending Content-Length: 0 is optional for TRACE (#33)
* Sending Content-Length: 0 is optional for TRACE * Don't make any useless assertions
1 parent 0174b36 commit ca59f01

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/HttpBaseTest.php

+4
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,10 @@ protected function assertRequest(
270270

271271
$name = strtoupper(str_replace('-', '_', 'http-'.$name));
272272

273+
if ($method === 'TRACE' && $name === 'HTTP_CONTENT_LENGTH' && !isset($request['SERVER'][$name])) {
274+
continue;
275+
}
276+
273277
$this->assertArrayHasKey($name, $request['SERVER']);
274278
$this->assertSame($value, $request['SERVER'][$name], "Failed asserting value for {$name}.");
275279
}

0 commit comments

Comments
 (0)