Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ autest:
name: 'ts-body-buffer'
process_config:
enable_cache: false
enable_tls: true

plugin_config:
- request_buffer.so
Expand All @@ -52,6 +53,8 @@ autest:
description: "Verify that the plugin parsed the content-length request body data"
- expression: "request_buffer_plugin gets the request body with length\\[25\\]"
description: "Verify that the plugin parsed the chunked request body data"
- expression: "request_buffer_plugin gets the request body with length\\[19\\]"
description: "Verify that the plugin parsed the HTTP/2 request body data"

sessions:
- transactions:
Expand Down Expand Up @@ -121,3 +124,40 @@ sessions:
content:
verify: { value: "10\r\nchunked response\r\n0\r\n\r\n", as: equal }

# Verify request body buffering for HTTP/2 transactions.
- protocol:
stack: http2
tls:
sni: www.example.com
transactions:
- client-request:
headers:
fields:
- [":method", POST]
- [":scheme", https]
- [":authority", www.example.com]
- [":path", /http2]
- [Content-Length, 19]
- [uuid, http2-post]
content:
data: "HTTP/2 request body"

proxy-request:
method: "POST"
url: /http2
content:
verify: { value: "HTTP/2 request body", as: equal }

server-response:
status: 200
reason: OK
headers:
fields:
- [Content-Length, 15]
content:
data: "HTTP/2 response"

proxy-response:
status: 200
content:
verify: { value: "HTTP/2 response", as: equal }