path: tests/fixtures/llhttp/request/invalid-whitespace-token-with-content-length-header-field-lenient.yml
name: Invalid Whitespace Token With Content-Length Header Field (lenient)
checked: true
source:
  path: test/request/content-length.md
  line: 189
meta:
  type: request-lenient-headers
input:
- PUT /url HTTP/1.1
- 'Connection: upgrade'
- 'Content-Length : 4'
- 'Upgrade: ws'
- ''
- abcdefgh
llhttp:
- off=0 message begin
- off=0 len=3 span[method]="PUT"
- off=3 method complete
- off=4 len=4 span[url]="/url"
- off=9 url complete
- off=9 len=4 span[protocol]="HTTP"
- off=13 protocol complete
- off=14 len=3 span[version]="1.1"
- off=17 version complete
- off=19 len=10 span[header_field]="Connection"
- off=30 header_field complete
- off=31 len=7 span[header_value]="upgrade"
- off=40 header_value complete
- off=40 len=15 span[header_field]="Content-Length "
- off=56 header_field complete
- off=57 len=1 span[header_value]="4"
- off=60 header_value complete
- off=60 len=7 span[header_field]="Upgrade"
- off=68 header_field complete
- off=69 len=2 span[header_value]="ws"
- off=73 header_value complete
- off=75 headers complete method=4 v=1/1 flags=34 content_length=4
- off=75 len=4 span[body]="abcd"
- off=79 message complete
- off=79 error code=22 reason="Pause on CONNECT/Upgrade"
output:
- offset: 0
  type: request
  payload: null
- offset: 0
  type: begin
  payload: null
- offset: 0
  type: method
  payload: PUT
- offset: 4
  type: url
  payload: /url
- offset: 9
  type: protocol
  payload: HTTP
- offset: 14
  type: version
  payload: '1.1'
- offset: 19
  type: header_name
  payload: Connection
- offset: 31
  type: header_value
  payload: upgrade
- offset: 40
  type: error
  payload:
    code: UNEXPECTED_CHARACTER
    description: Invalid header field name character
