@@ -222,4 +222,70 @@ off=22 len=9 span[header_value]="localhost"
222222off=33 len=5 span[header_field]="Dummy"
223223off=40 len=1 span[header_value]="x"
224224off=41 error code=10 reason="Invalid header value char"
225- ```
225+ ```
226+
227+ ### Spaces before headers
228+
229+ <!-- meta={ "type": "request" } -->
230+
231+ ``` http
232+ POST /hello HTTP/1.1
233+ Host: localhost
234+ Foo: bar
235+ Content-Length: 38
236+ GET /bye HTTP/1.1
237+ Host: localhost
238+ ```
239+
240+ ``` log
241+ off=0 message begin
242+ off=5 len=6 span[url]="/hello"
243+ off=12 url complete
244+ off=22 len=4 span[header_field]="Host"
245+ off=27 header_field complete
246+ off=28 len=9 span[header_value]="localhost"
247+ off=39 header_value complete
248+ off=39 len=3 span[header_field]="Foo"
249+ off=43 header_field complete
250+ off=44 len=3 span[header_value]="bar"
251+ off=49 error code=10 reason="Unexpected whitespace after header value"
252+ ```
253+
254+ ### Spaces before headers (lenient)
255+
256+ <!-- meta={ "type": "request-lenient" } -->
257+
258+ ``` http
259+ POST /hello HTTP/1.1
260+ Host: localhost
261+ Foo: bar
262+ Content-Length: 38
263+ GET /bye HTTP/1.1
264+ Host: localhost
265+ ```
266+
267+ ``` log
268+ off=0 message begin
269+ off=5 len=6 span[url]="/hello"
270+ off=12 url complete
271+ off=22 len=4 span[header_field]="Host"
272+ off=27 header_field complete
273+ off=28 len=9 span[header_value]="localhost"
274+ off=39 header_value complete
275+ off=39 len=3 span[header_field]="Foo"
276+ off=43 header_field complete
277+ off=44 len=3 span[header_value]="bar"
278+ off=49 len=19 span[header_value]=" Content-Length: 38"
279+ off=70 header_value complete
280+ off=72 headers complete method=3 v=1/1 flags=0 content_length=0
281+ off=72 message complete
282+ off=72 message begin
283+ off=76 len=4 span[url]="/bye"
284+ off=81 url complete
285+ off=91 len=4 span[header_field]="Host"
286+ off=96 header_field complete
287+ off=97 len=9 span[header_value]="localhost"
288+ off=108 header_value complete
289+ off=110 headers complete method=1 v=1/1 flags=0 content_length=0
290+ off=110 message complete
291+ ```
0 commit comments