asupersync 0.3.4

Spec-first, cancel-correct, capability-secure async runtime for Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
---
source: src/http/h1/codec.rs
assertion_line: 2721
expression: failure_report
---
failure_0: "CONFORMANCE MISMATCH: Basic GET request\nOur result:  ParsedRequest { method: \"Get\", uri: \"/\", version: \"Http11\", headers: [(\"Host\", \"example.com\")] }\nRef result:  ParsedRequest { method: \"GET\", uri: \"/\", version: \"Http11\", headers: [(\"Host\", \"example.com\")] }\nRaw bytes:   \"GET / HTTP/1.1\\r\\nHost: example.com\\r\\n\\r\\n\""
failure_1: "CONFORMANCE MISMATCH: POST with Content-Length body\nOur result:  ParsedRequest { method: \"Post\", uri: \"/api/v1/data\", version: \"Http11\", headers: [(\"Host\", \"api.example.com\"), (\"Content-Type\", \"application/json\"), (\"Content-Length\", \"13\")] }\nRef result:  ParsedRequest { method: \"POST\", uri: \"/api/v1/data\", version: \"Http11\", headers: [(\"Host\", \"api.example.com\"), (\"Content-Type\", \"application/json\"), (\"Content-Length\", \"13\")] }\nRaw bytes:   \"POST /api/v1/data HTTP/1.1\\r\\nHost: api.example.com\\r\\nContent-Type: application/json\\r\\nContent-Length: 13\\r\\n\\r\\n{\\\"test\\\":\\\"data\\\"}\""
failure_2: "CONFORMANCE MISMATCH: Basic chunked encoding\nOur result:  ParsedRequest { method: \"Post\", uri: \"/upload\", version: \"Http11\", headers: [(\"Host\", \"example.com\"), (\"Transfer-Encoding\", \"chunked\")] }\nRef result:  ParsedRequest { method: \"POST\", uri: \"/upload\", version: \"Http11\", headers: [(\"Host\", \"example.com\"), (\"Transfer-Encoding\", \"chunked\")] }\nRaw bytes:   \"POST /upload HTTP/1.1\\r\\nHost: example.com\\r\\nTransfer-Encoding: chunked\\r\\n\\r\\n5\\r\\nhello\\r\\n6\\r\\n world\\r\\n0\\r\\n\\r\\n\""
failure_3: "CONFORMANCE MISMATCH: Chunked encoding with extensions\nOur result:  ParsedRequest { method: \"Post\", uri: \"/upload\", version: \"Http11\", headers: [(\"Transfer-Encoding\", \"chunked\")] }\nRef result:  ParsedRequest { method: \"POST\", uri: \"/upload\", version: \"Http11\", headers: [(\"Transfer-Encoding\", \"chunked\")] }\nRaw bytes:   \"POST /upload HTTP/1.1\\r\\nTransfer-Encoding: chunked\\r\\n\\r\\n5;ext=value\\r\\nhello\\r\\n0\\r\\n\\r\\n\""
failure_4: "CONFORMANCE MISMATCH: Chunked encoding with zero-length chunks\nOur result:  ParsedRequest { method: \"Post\", uri: \"/stream\", version: \"Http11\", headers: [(\"Transfer-Encoding\", \"chunked\")] }\nRef result:  ParsedRequest { method: \"POST\", uri: \"/stream\", version: \"Http11\", headers: [(\"Transfer-Encoding\", \"chunked\")] }\nRaw bytes:   \"POST /stream HTTP/1.1\\r\\nTransfer-Encoding: chunked\\r\\n\\r\\n3\\r\\nfoo\\r\\n0\\r\\n\\r\\n3\\r\\nbar\\r\\n0\\r\\n\\r\\n\""
failure_5: "CONFORMANCE MISMATCH: Complex headers with multiple values\nOur result:  ParsedRequest { method: \"Put\", uri: \"/resource\", version: \"Http11\", headers: [(\"Host\", \"example.com\"), (\"User-Agent\", \"test-client/1.0\"), (\"Accept\", \"application/json, text/plain\"), (\"Authorization\", \"Bearer token123\"), (\"Content-Length\", \"0\")] }\nRef result:  ParsedRequest { method: \"PUT\", uri: \"/resource\", version: \"Http11\", headers: [(\"Host\", \"example.com\"), (\"User-Agent\", \"test-client/1.0\"), (\"Accept\", \"application/json, text/plain\"), (\"Authorization\", \"Bearer token123\"), (\"Content-Length\", \"0\")] }\nRaw bytes:   \"PUT /resource HTTP/1.1\\r\\nHost: example.com\\r\\nUser-Agent: test-client/1.0\\r\\nAccept: application/json, text/plain\\r\\nAuthorization: Bearer token123\\r\\nContent-Length: 0\\r\\n\\r\\n\""
failure_6: "CONFORMANCE MISMATCH: HTTP/1.0 request\nOur result:  ParsedRequest { method: \"Get\", uri: \"/legacy\", version: \"Http10\", headers: [(\"Host\", \"old.example.com\")] }\nRef result:  ParsedRequest { method: \"GET\", uri: \"/legacy\", version: \"Http10\", headers: [(\"Host\", \"old.example.com\")] }\nRaw bytes:   \"GET /legacy HTTP/1.0\\r\\nHost: old.example.com\\r\\n\\r\\n\""
failure_7: "CONFORMANCE MISMATCH: OPTIONS with asterisk URI\nOur result:  ParsedRequest { method: \"Options\", uri: \"*\", version: \"Http11\", headers: [(\"Host\", \"example.com\")] }\nRef result:  ParsedRequest { method: \"OPTIONS\", uri: \"*\", version: \"Http11\", headers: [(\"Host\", \"example.com\")] }\nRaw bytes:   \"OPTIONS * HTTP/1.1\\r\\nHost: example.com\\r\\n\\r\\n\""
failure_8: "CONFORMANCE MISMATCH: Chunked encoding with trailers\nOur result:  ParsedRequest { method: \"Post\", uri: \"/data\", version: \"Http11\", headers: [(\"Transfer-Encoding\", \"chunked\")] }\nRef result:  ParsedRequest { method: \"POST\", uri: \"/data\", version: \"Http11\", headers: [(\"Transfer-Encoding\", \"chunked\")] }\nRaw bytes:   \"POST /data HTTP/1.1\\r\\nTransfer-Encoding: chunked\\r\\n\\r\\n4\\r\\ntest\\r\\n0\\r\\nX-Checksum: abc123\\r\\n\\r\\n\""
failure_9: "EXPECTED ERROR but reference succeeded: Invalid chunk size\nOur error:  BadChunkedEncoding\nRef result: ParsedRequest { method: \"POST\", uri: \"/bad\", version: \"Http11\", headers: [(\"Transfer-Encoding\", \"chunked\")] }\nRaw bytes:  \"POST /bad HTTP/1.1\\r\\nTransfer-Encoding: chunked\\r\\n\\r\\nZZ\\r\\ndata\\r\\n\""