Skip to content

Commit

Permalink
Sending Content-Length: 0 is optional for TRACE (#33)
Browse files Browse the repository at this point in the history
* Sending Content-Length: 0 is optional for TRACE

* Don't make any useless assertions
  • Loading branch information
kelunik authored and Nyholm committed Jul 10, 2017
1 parent 0174b36 commit ca59f01
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/HttpBaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,10 @@ protected function assertRequest(

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

if ($method === 'TRACE' && $name === 'HTTP_CONTENT_LENGTH' && !isset($request['SERVER'][$name])) {
continue;
}

$this->assertArrayHasKey($name, $request['SERVER']);
$this->assertSame($value, $request['SERVER'][$name], "Failed asserting value for {$name}.");
}
Expand Down

0 comments on commit ca59f01

Please sign in to comment.