path: tests/fixtures/llhttp/request/upgrade-upgrade-post-request.yml
name: upgrade / Upgrade POST Request
checked: true
source:
  path: test/request/connection.md
  line: 734
meta:
  type: request
input:
- POST /demo HTTP/1.1
- 'Host: example.com'
- 'Connection: Upgrade'
- 'Upgrade: HTTP/2.0'
- 'Content-Length: 15'
- ''
- sweet post body\
- Hot diggity dogg
llhttp:
- off=0 message begin
- off=0 len=4 span[method]="POST"
- off=4 method complete
- off=5 len=5 span[url]="/demo"
- off=11 url complete
- off=11 len=4 span[protocol]="HTTP"
- off=15 protocol complete
- off=16 len=3 span[version]="1.1"
- off=19 version complete
- off=21 len=4 span[header_field]="Host"
- off=26 header_field complete
- off=27 len=11 span[header_value]="example.com"
- off=40 header_value complete
- off=40 len=10 span[header_field]="Connection"
- off=51 header_field complete
- off=52 len=7 span[header_value]="Upgrade"
- off=61 header_value complete
- off=61 len=7 span[header_field]="Upgrade"
- off=69 header_field complete
- off=70 len=8 span[header_value]="HTTP/2.0"
- off=80 header_value complete
- off=80 len=14 span[header_field]="Content-Length"
- off=95 header_field complete
- off=96 len=2 span[header_value]="15"
- off=100 header_value complete
- off=102 headers complete method=3 v=1/1 flags=34 content_length=15
- off=102 len=15 span[body]="sweet post body"
- off=117 message complete
- off=117 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: POST
- offset: 5
  type: url
  payload: /demo
- offset: 11
  type: protocol
  payload: HTTP
- offset: 16
  type: version
  payload: '1.1'
- offset: 21
  type: header_name
  payload: Host
- offset: 27
  type: header_value
  payload: example.com
- offset: 40
  type: header_name
  payload: Connection
- offset: 52
  type: header_value
  payload: Upgrade
- offset: 61
  type: header_name
  payload: Upgrade
- offset: 70
  type: header_value
  payload: HTTP/2.0
- offset: 80
  type: header_name
  payload: Content-Length
- offset: 96
  type: header_value
  payload: '15'
- offset: 102
  type: headers
  payload:
    method: POST
    status: null
    url: /demo
    protocol: HTTP
    version: '1.1'
    body: 15
- offset: 102
  type: data
  payload: sweet post body
- offset: 117
  type: body
  payload: null
- offset: 117
  type: complete
  payload: null
- offset: 117
  type: tunnel
  payload: null
