updated-packages
This commit is contained in:
		
							
								
								
									
										17
									
								
								vendor/guzzlehttp/psr7/src/ServerRequest.php
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										17
									
								
								vendor/guzzlehttp/psr7/src/ServerRequest.php
									
									
									
									
										vendored
									
									
								
							| @@ -4,9 +4,9 @@ namespace GuzzleHttp\Psr7; | ||||
|  | ||||
| use InvalidArgumentException; | ||||
| use Psr\Http\Message\ServerRequestInterface; | ||||
| use Psr\Http\Message\UriInterface; | ||||
| use Psr\Http\Message\StreamInterface; | ||||
| use Psr\Http\Message\UploadedFileInterface; | ||||
| use Psr\Http\Message\UriInterface; | ||||
|  | ||||
| /** | ||||
|  * Server-side HTTP request | ||||
| @@ -35,7 +35,7 @@ class ServerRequest extends Request implements ServerRequestInterface | ||||
|     private $cookieParams = []; | ||||
|  | ||||
|     /** | ||||
|      * @var null|array|object | ||||
|      * @var array|object|null | ||||
|      */ | ||||
|     private $parsedBody; | ||||
|  | ||||
| @@ -58,7 +58,7 @@ class ServerRequest extends Request implements ServerRequestInterface | ||||
|      * @param string                               $method       HTTP method | ||||
|      * @param string|UriInterface                  $uri          URI | ||||
|      * @param array                                $headers      Request headers | ||||
|      * @param string|null|resource|StreamInterface $body         Request body | ||||
|      * @param string|resource|StreamInterface|null $body         Request body | ||||
|      * @param string                               $version      Protocol version | ||||
|      * @param array                                $serverParams Typically the $_SERVER superglobal | ||||
|      */ | ||||
| @@ -79,8 +79,10 @@ class ServerRequest extends Request implements ServerRequestInterface | ||||
|      * Return an UploadedFile instance array. | ||||
|      * | ||||
|      * @param array $files A array which respect $_FILES structure | ||||
|      * @throws InvalidArgumentException for unrecognized values | ||||
|      * | ||||
|      * @return array | ||||
|      * | ||||
|      * @throws InvalidArgumentException for unrecognized values | ||||
|      */ | ||||
|     public static function normalizeFiles(array $files) | ||||
|     { | ||||
| @@ -109,6 +111,7 @@ class ServerRequest extends Request implements ServerRequestInterface | ||||
|      * delegate to normalizeNestedFileSpec() and return that return value. | ||||
|      * | ||||
|      * @param array $value $_FILES struct | ||||
|      * | ||||
|      * @return array|UploadedFileInterface | ||||
|      */ | ||||
|     private static function createUploadedFileFromSpec(array $value) | ||||
| @@ -133,6 +136,7 @@ class ServerRequest extends Request implements ServerRequestInterface | ||||
|      * UploadedFileInterface instances. | ||||
|      * | ||||
|      * @param array $files | ||||
|      * | ||||
|      * @return UploadedFileInterface[] | ||||
|      */ | ||||
|     private static function normalizeNestedFileSpec(array $files = []) | ||||
| @@ -168,7 +172,7 @@ class ServerRequest extends Request implements ServerRequestInterface | ||||
|         $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET'; | ||||
|         $headers = getallheaders(); | ||||
|         $uri = self::getUriFromGlobals(); | ||||
|         $body = new LazyOpenStream('php://input', 'r+'); | ||||
|         $body = new CachingStream(new LazyOpenStream('php://input', 'r+')); | ||||
|         $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? str_replace('HTTP/', '', $_SERVER['SERVER_PROTOCOL']) : '1.1'; | ||||
|  | ||||
|         $serverRequest = new ServerRequest($method, $uri, $headers, $body, $protocol, $_SERVER); | ||||
| @@ -182,7 +186,7 @@ class ServerRequest extends Request implements ServerRequestInterface | ||||
|  | ||||
|     private static function extractHostAndPortFromAuthority($authority) | ||||
|     { | ||||
|         $uri = 'http://'.$authority; | ||||
|         $uri = 'http://' . $authority; | ||||
|         $parts = parse_url($uri); | ||||
|         if (false === $parts) { | ||||
|             return [null, null]; | ||||
| @@ -243,7 +247,6 @@ class ServerRequest extends Request implements ServerRequestInterface | ||||
|         return $uri; | ||||
|     } | ||||
|  | ||||
|  | ||||
|     /** | ||||
|      * {@inheritdoc} | ||||
|      */ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 RafficMohammed
					RafficMohammed