From 53ddba7092a2b1b1ab85e8c775b1d17a12252d83 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 8 Mar 2023 14:57:35 +0100 Subject: [PATCH] docs: Fix Content-Type return value The example implied that the header would be split along semicolons but those just separate parameters within a single Content-Type header: https://www.rfc-editor.org/rfc/rfc2616#section-14.17 Multiple Content-Type headers are not permitted anyway, as the header does not accept a comma-separated list: https://www.rfc-editor.org/rfc/rfc2616#section-4.2 --- docs/PSR7-Usage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/PSR7-Usage.md b/docs/PSR7-Usage.md index b6d048a..3f2d70e 100644 --- a/docs/PSR7-Usage.md +++ b/docs/PSR7-Usage.md @@ -56,7 +56,7 @@ $response->getHeaderLine('My-Custom-Header'); // will return: "My Custom Messag #### Getting array of value from a header (also applies to request) ```php // getting value from request headers -$request->getHeader('Content-Type'); // will return: ["text/html", "charset=UTF-8"] +$request->getHeader('Content-Type'); // will return: ["text/html; charset=UTF-8"] // getting value from response headers $response->getHeader('My-Custom-Header'); // will return: ["My Custom Message", "The second message"] ```