Skip to content

Commit

Permalink
fix HTTP-version case-sensitivity on Response.php
Browse files Browse the repository at this point in the history
Based on rfc7230 : HTTP-version is case-sensitive.
For example, wrk don't work with `Http/1.1` version but work with `HTTP/1.1`.
  • Loading branch information
yoh authored Oct 26, 2022
1 parent 76ead09 commit 79fea20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Response/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public function rawBody(): string

public function __toString()
{
$head = "Http/1.1 $this->status {$this->phrases[$this->status]}\r\n";
$head = "HTTP/1.1 $this->status {$this->phrases[$this->status]}\r\n";

foreach ($this->headers as $name => $value) {
if (\is_array($value)) {
Expand Down

0 comments on commit 79fea20

Please sign in to comment.