Skip to content

Commit 9858acc

Browse files
csevcursoragent
andcommitted
Note that parseHeaders keeps header names as received.
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 39536fc commit 9858acc

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/src/Util/Net.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ public static function getLastBODYDebug() {
9191
/**
9292
* Extract a set of header lines into an array
9393
*
94-
* Takes a newline separated header sting and returns a key/value array
94+
* Takes a newline separated header sting and returns a key/value array.
95+
* Keys are kept as received (HTTP/2 and HTTP/3 send them lowercase).
96+
* Header names are case-insensitive (RFC 7230 / RFC 9110), so look
97+
* them up with U::getIgnoreCase() rather than U::get().
9598
*/
9699
public static function parseHeaders($headerstr=false) {
97100
if ( $headerstr === false ) $headerstr = self::getLastHeadersReceived();

0 commit comments

Comments
 (0)