Skip to content

Commit c49274b

Browse files
hakrenielsdos
authored andcommitted
fix(reference/stream): HTTP headers are U+0D U+0A (CR LF) separated
correction of the formally wrong comment and place in the example code. streamlining the example code style on separating multiple headers over multiple lines. compare Section 4.1 of RFC-2616 etc. generic-message = start-line *(message-header CRLF) CRLF [ message-body ] RFC-2616: https://www.rfc-editor.org/rfc/rfc2616#section-4.1 ok: /reference/stream/functions/stream-context-set-default.xml etc.
1 parent 1d45574 commit c49274b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

reference/stream/functions/stream-context-create.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@
8888
$opts = [
8989
'http' => [
9090
'method' => "GET",
91-
// Use newline \n to separate multiple headers
92-
'header' => "Accept-language: en\nCookie: foo=bar",
91+
// Use CRLF \r\n to separate multiple headers
92+
'header' => "Accept-language: en\r\n" .
93+
"Cookie: foo=bar",
9394
]
9495
];
9596

0 commit comments

Comments
 (0)