Skip to content

Commit

Permalink
Merge pull request #3 from bearsunday/hotfix-respect-code
Browse files Browse the repository at this point in the history
Respect status code
  • Loading branch information
koriym authored Oct 15, 2017
2 parents aa68ef9 + f1e35f2 commit 92c8a0e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/StreamResponder.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ public function __invoke(ResourceObject $resourceObject, array $server)
$resourceObject->toString();
}

// code
http_response_code($resourceObject->code);

// header
foreach ($resourceObject->headers as $label => $value) {
header("{$label}: {$value}", false);
}

// code
http_response_code($resourceObject->code);

// stream body
$stream = $this->streamer->getStream($resourceObject->view);
rewind($stream);
Expand Down

0 comments on commit 92c8a0e

Please sign in to comment.