diff --git a/caddytest/spec/http/requestbody/spec.hurl b/caddytest/spec/http/requestbody/spec.hurl new file mode 100644 index 00000000..3971fddd --- /dev/null +++ b/caddytest/spec/http/requestbody/spec.hurl @@ -0,0 +1,35 @@ +# Configure Caddy +POST http://localhost:2019/load +Content-Type: text/caddyfile +``` +{ + skip_install_trust + http_port 9080 + https_port 9443 + local_certs +} +localhost { + log + request_body { + max_size 2B + } + reverse_proxy localhost:8000 # to fake body reading + handle_errors 4xx { + respond "OK" + } +} +http://localhost:8000 { + respond "Failed" +} +``` + +GET https://localhost:9443 +[Options] +insecure: true +``` +Hello +``` +HTTP 413 +`OK` + +# TODO: how to test{read,write}_timeout? \ No newline at end of file