Revert "composer package update"

This reverts commit e979959219.
This commit is contained in:
2020-01-28 00:23:38 +09:00
parent ed69eb5d7b
commit 9cd40b213d
421 changed files with 16273 additions and 14007 deletions
+2 -11
View File
@@ -36,7 +36,6 @@ class Request implements RequestInterface
$body = null,
$version = '1.1'
) {
$this->assertMethod($method);
if (!($uri instanceof UriInterface)) {
$uri = new Uri($uri);
}
@@ -46,7 +45,7 @@ class Request implements RequestInterface
$this->setHeaders($headers);
$this->protocol = $version;
if (!isset($this->headerNames['host'])) {
if (!$this->hasHeader('Host')) {
$this->updateHostFromUri();
}
@@ -92,7 +91,6 @@ class Request implements RequestInterface
public function withMethod($method)
{
$this->assertMethod($method);
$new = clone $this;
$new->method = strtoupper($method);
return $new;
@@ -112,7 +110,7 @@ class Request implements RequestInterface
$new = clone $this;
$new->uri = $uri;
if (!$preserveHost || !isset($this->headerNames['host'])) {
if (!$preserveHost) {
$new->updateHostFromUri();
}
@@ -141,11 +139,4 @@ class Request implements RequestInterface
// See: http://tools.ietf.org/html/rfc7230#section-5.4
$this->headers = [$header => [$host]] + $this->headers;
}
private function assertMethod($method)
{
if (!is_string($method) || $method === '') {
throw new \InvalidArgumentException('Method must be a non-empty string.');
}
}
}