path: tests/fixtures/llhttp/response/content-length-reset-when-no-body-is-received.yml
name: Content-Length Reset When No Body Is Received
checked: true
source:
  path: test/response/content-length.md
  line: 123
meta:
  skipBody: true
  type: response
input:
- HTTP/1.1 200 OK
- 'Content-Length: 123'
- ''
- HTTP/1.1 200 OK
- 'Content-Length: 456'
- ''
- ''
llhttp:
- off=0 message begin
- off=0 len=4 span[protocol]="HTTP"
- off=4 protocol complete
- off=5 len=3 span[version]="1.1"
- off=8 version complete
- off=13 len=2 span[status]="OK"
- off=17 status complete
- off=17 len=14 span[header_field]="Content-Length"
- off=32 header_field complete
- off=33 len=3 span[header_value]="123"
- off=38 header_value complete
- off=40 headers complete status=200 v=1/1 flags=20 content_length=123
- off=40 skip body
- off=40 message complete
- off=40 reset
- off=40 message begin
- off=40 len=4 span[protocol]="HTTP"
- off=44 protocol complete
- off=45 len=3 span[version]="1.1"
- off=48 version complete
- off=53 len=2 span[status]="OK"
- off=57 status complete
- off=57 len=14 span[header_field]="Content-Length"
- off=72 header_field complete
- off=73 len=3 span[header_value]="456"
- off=78 header_value complete
- off=80 headers complete status=200 v=1/1 flags=20 content_length=456
- off=80 skip body
- off=80 message complete
output:
- offset: 0
  type: response
  payload: null
- offset: 0
  type: begin
  payload: null
- offset: 0
  type: protocol
  payload: HTTP
- offset: 5
  type: version
  payload: '1.1'
- offset: 9
  type: status
  payload: '200'
- offset: 13
  type: reason
  payload: OK
- offset: 17
  type: header_name
  payload: Content-Length
- offset: 33
  type: header_value
  payload: '123'
- offset: 40
  type: headers
  payload:
    method: null
    status: 200
    url: null
    protocol: HTTP
    version: '1.1'
    body: 123
- offset: 40
  type: complete
  payload: null
- offset: 40
  type: response
  payload: null
- offset: 40
  type: begin
  payload: null
- offset: 40
  type: protocol
  payload: HTTP
- offset: 45
  type: version
  payload: '1.1'
- offset: 49
  type: status
  payload: '200'
- offset: 53
  type: reason
  payload: OK
- offset: 57
  type: header_name
  payload: Content-Length
- offset: 73
  type: header_value
  payload: '456'
- offset: 80
  type: headers
  payload:
    method: null
    status: 200
    url: null
    protocol: HTTP
    version: '1.1'
    body: 456
- offset: 80
  type: complete
  payload: null
