path: tests/fixtures/llhttp/response/http-200-response-with-upgrade-header-and-transfer-encoding.yml
name: HTTP 200 Response With Upgrade Header And Transfer-Encoding
checked: true
source:
  path: test/response/connection.md
  line: 442
meta:
  type: response
input:
- HTTP/1.1 200 OK
- 'Connection: upgrade'
- 'Upgrade: h2c'
- 'Transfer-Encoding: chunked'
- ''
- '2'
- bo
- '2'
- dy
- '0'
- ''
- ''
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=10 span[header_field]="Connection"
- off=28 header_field complete
- off=29 len=7 span[header_value]="upgrade"
- off=38 header_value complete
- off=38 len=7 span[header_field]="Upgrade"
- off=46 header_field complete
- off=47 len=3 span[header_value]="h2c"
- off=52 header_value complete
- off=52 len=17 span[header_field]="Transfer-Encoding"
- off=70 header_field complete
- off=71 len=7 span[header_value]="chunked"
- off=80 header_value complete
- off=82 headers complete status=200 v=1/1 flags=21c content_length=0
- off=85 chunk header len=2
- off=85 len=2 span[body]="bo"
- off=89 chunk complete
- off=92 chunk header len=2
- off=92 len=2 span[body]="dy"
- off=96 chunk complete
- off=99 chunk header len=0
- off=101 chunk complete
- off=101 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: Connection
- offset: 29
  type: header_value
  payload: upgrade
- offset: 38
  type: header_name
  payload: Upgrade
- offset: 47
  type: header_value
  payload: h2c
- offset: 52
  type: header_name
  payload: Transfer-Encoding
- offset: 71
  type: header_value
  payload: chunked
- offset: 82
  type: headers
  payload:
    method: null
    status: 200
    url: null
    protocol: HTTP
    version: '1.1'
    body: chunked
- offset: 82
  type: chunk_length
  payload: '2'
- offset: 85
  type: chunk
  payload: bo
- offset: 85
  type: data
  payload: bo
- offset: 89
  type: chunk_length
  payload: '2'
- offset: 92
  type: chunk
  payload: dy
- offset: 92
  type: data
  payload: dy
- offset: 96
  type: chunk_length
  payload: '0'
- offset: 99
  type: chunk
  payload: null
- offset: 99
  type: body
  payload: null
- offset: 101
  type: trailers
  payload: null
- offset: 101
  type: complete
  payload: null
