@@ -402,4 +402,89 @@ off=6 url complete
402402off=11 len=3 span[version]="1.1"
403403off=14 version complete
404404off=17 error code=30 reason="Unexpected space after start line"
405+ ```
406+
407+ ### Spaces before headers
408+
409+ <!-- meta={ "type": "request" } -->
410+
411+ ``` http
412+ POST /hello HTTP/1.1
413+ Host: localhost
414+ Foo: bar
415+ Content-Length: 38
416+
417+ GET /bye HTTP/1.1
418+ Host: localhost
419+
420+
421+ ```
422+
423+ ``` log
424+ off=0 message begin
425+ off=0 len=4 span[method]="POST"
426+ off=4 method complete
427+ off=5 len=6 span[url]="/hello"
428+ off=12 url complete
429+ off=17 len=3 span[version]="1.1"
430+ off=20 version complete
431+ off=22 len=4 span[header_field]="Host"
432+ off=27 header_field complete
433+ off=28 len=9 span[header_value]="localhost"
434+ off=39 header_value complete
435+ off=39 len=3 span[header_field]="Foo"
436+ off=43 header_field complete
437+ off=44 len=3 span[header_value]="bar"
438+ off=49 error code=10 reason="Unexpected whitespace after header value"
439+ ```
440+
441+ ### Spaces before headers (lenient)
442+
443+ <!-- meta={ "type": "request-lenient-headers" } -->
444+
445+ ``` http
446+ POST /hello HTTP/1.1
447+ Host: localhost
448+ Foo: bar
449+ Content-Length: 38
450+
451+ GET /bye HTTP/1.1
452+ Host: localhost
453+
454+
455+ ```
456+
457+ ``` log
458+ off=0 message begin
459+ off=0 len=4 span[method]="POST"
460+ off=4 method complete
461+ off=5 len=6 span[url]="/hello"
462+ off=12 url complete
463+ off=17 len=3 span[version]="1.1"
464+ off=20 version complete
465+ off=22 len=4 span[header_field]="Host"
466+ off=27 header_field complete
467+ off=28 len=9 span[header_value]="localhost"
468+ off=39 header_value complete
469+ off=39 len=3 span[header_field]="Foo"
470+ off=43 header_field complete
471+ off=44 len=3 span[header_value]="bar"
472+ off=49 len=19 span[header_value]=" Content-Length: 38"
473+ off=70 header_value complete
474+ off=72 headers complete method=3 v=1/1 flags=0 content_length=0
475+ off=72 message complete
476+ off=72 reset
477+ off=72 message begin
478+ off=72 len=3 span[method]="GET"
479+ off=75 method complete
480+ off=76 len=4 span[url]="/bye"
481+ off=81 url complete
482+ off=86 len=3 span[version]="1.1"
483+ off=89 version complete
484+ off=91 len=4 span[header_field]="Host"
485+ off=96 header_field complete
486+ off=97 len=9 span[header_value]="localhost"
487+ off=108 header_value complete
488+ off=110 headers complete method=1 v=1/1 flags=0 content_length=0
489+ off=110 message complete
405490```
0 commit comments