From 48fd9439b9f6e1a7bd01dbcefb6e281e39ff2b67 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Thu, 11 Feb 2021 03:09:13 +0100 Subject: [PATCH 1/2] typo --- src/Http/Response.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Response.php b/src/Http/Response.php index 1c71bacd..e2ca6a65 100644 --- a/src/Http/Response.php +++ b/src/Http/Response.php @@ -311,7 +311,7 @@ private function checkHeaders(): void ob_get_length() && !array_filter(ob_get_status(true), function (array $i): bool { return !$i['chunk_size']; }) ) { - trigger_error('Possible problem: you are sending a HTTP header while already having some data in output buffer. Try Tracy\OutputDebugger or start session earlier.'); + trigger_error('Possible problem: you are sending a HTTP header while already having some data in output buffer. Try Tracy\OutputDebugger or send cookies/start session earlier.'); } } } From 668787a017bdfb5ff5e4a460952e27da1503b9ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bar=C3=A1=C5=A1ek?= Date: Mon, 1 Mar 2021 10:04:52 +0100 Subject: [PATCH 2/2] Request: In case of CLI method should be CLI too. --- src/Http/Request.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Request.php b/src/Http/Request.php index 2aaff910..979e3193 100644 --- a/src/Http/Request.php +++ b/src/Http/Request.php @@ -77,7 +77,7 @@ public function __construct( $this->files = (array) $files; $this->cookies = (array) $cookies; $this->headers = array_change_key_case((array) $headers, CASE_LOWER); - $this->method = $method ?: 'GET'; + $this->method = $method ?: (PHP_SAPI === 'cli' ? 'CLI' : 'GET'); $this->remoteAddress = $remoteAddress; $this->remoteHost = $remoteHost; $this->rawBodyCallback = $rawBodyCallback;