path: tests/fixtures/llhttp/request/line-folding-in-header-value-with-crlf.yml
name: Line Folding In Header Value With CRLF
checked: true
source:
  path: test/request/sample.md
  line: 333
meta:
  type: request-lenient-headers
input:
- GET / HTTP/1.1
- 'Line1:   abc'
- \tdef
- ' ghi'
- \t\tjkl
- '  mno '
- \t \tqrs
- 'Line2: \t line2\t'
- 'Line3:'
- ' line3'
- 'Line4: '
- ' '
- 'Connection:'
- ' close'
- ''
- ''
llhttp:
- off=0 message begin
- off=0 len=3 span[method]="GET"
- off=3 method complete
- off=4 len=1 span[url]="/"
- off=6 url complete
- off=6 len=4 span[protocol]="HTTP"
- off=10 protocol complete
- off=11 len=3 span[version]="1.1"
- off=14 version complete
- off=16 len=5 span[header_field]="Line1"
- off=22 header_field complete
- off=25 len=3 span[header_value]="abc"
- off=30 len=4 span[header_value]="\tdef"
- off=36 len=4 span[header_value]=" ghi"
- off=42 len=5 span[header_value]="\t\tjkl"
- off=49 len=6 span[header_value]="  mno "
- off=57 len=6 span[header_value]="\t \tqrs"
- off=65 header_value complete
- off=65 len=5 span[header_field]="Line2"
- off=71 header_field complete
- off=74 len=6 span[header_value]="line2\t"
- off=82 header_value complete
- off=82 len=5 span[header_field]="Line3"
- off=88 header_field complete
- off=91 len=5 span[header_value]="line3"
- off=98 header_value complete
- off=98 len=5 span[header_field]="Line4"
- off=104 header_field complete
- off=110 len=0 span[header_value]=""
- off=110 header_value complete
- off=110 len=10 span[header_field]="Connection"
- off=121 header_field complete
- off=124 len=5 span[header_value]="close"
- off=131 header_value complete
- off=133 headers complete method=1 v=1/1 flags=2 content_length=0
- off=133 message complete
output:
- offset: 0
  type: request
  payload: null
- offset: 0
  type: begin
  payload: null
- offset: 0
  type: method
  payload: GET
- offset: 4
  type: url
  payload: /
- offset: 6
  type: protocol
  payload: HTTP
- offset: 11
  type: version
  payload: '1.1'
- offset: 16
  type: header_name
  payload: Line1
- offset: 23
  type: header_value
  payload: '  abc'
- offset: 30
  type: error
  payload:
    code: UNEXPECTED_CHARACTER
    description: Invalid header field name character
