File: 0002-Release-1.8.5-491.patch

package info (click to toggle)
php-guzzlehttp-psr7 1.4.2-0.1%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 328 kB
  • sloc: php: 2,982; makefile: 4
file content (22 lines) | stat: -rw-r--r-- 1,065 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From: Graham Campbell <GrahamCampbell@users.noreply.github.com>
Date: Sun, 20 Mar 2022 21:51:18 +0000
Subject: Release 1.8.5 (#491)

Origin: backport, https://github.com/guzzle/psr7/commit/337e3ad8e5716c15f9657bd214d16cc5e69df268
---
 src/MessageTrait.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/MessageTrait.php b/src/MessageTrait.php
index f5f61db..4ac4687 100644
--- a/src/MessageTrait.php
+++ b/src/MessageTrait.php
@@ -218,7 +218,7 @@ trait MessageTrait
         // Clients must not send a request with line folding and a server sending folded headers is
         // likely very rare. Line folding is a fairly obscure feature of HTTP/1.1 and thus not accepting
         // folding is not likely to break any legitimate use case.
-        if (! preg_match('/^(?:[\x21-\x7E\x80-\xFF](?:[\x20\x09]+[\x21-\x7E\x80-\xFF])?)*$/', $value)) {
+        if (! preg_match('/^[\x20\x09\x21-\x7E\x80-\xFF]*$/', $value)) {
             throw new \InvalidArgumentException(sprintf('"%s" is not valid header value', $value));
         }
     }