Compliance cases

These are the 437 inputs a submission must parse. Each output must match the expected text byte for byte. You can run the suite without reading it, or open any case to see its input and expected output.

All three formats in RFC 9110 §5.6.7: IMF-fixdate, the obsolete RFC 850 form with its two-digit year, and ANSI C asctime. Matching is strict: exact case, single spaces, ASCII digits, the weekday must be the date's, and impossible dates, hour 24 and leap seconds are rejected, across the proleptic Gregorian years 0000 to 9999. The compliance suite has 80,281 lines: every HTTP-date the RFCs show, the tests of Go's net/http, Rust's httpdate, curl, Django and CPython's http.cookiejar pinned by commit, every month, weekday and two-digit year, leap rules, month ends, 32-bit limits, near-miss names and digits, and seeded random lines. An RFC 9110 parser, Python's datetime and V8 agree on every answer.

Run the full compliance suite locally. Replace your-component.wasm with your compiled component. Download the suite

curl -fLo parse_http_date.comply.wasm https://calculated.world/comply/parse_http_date.wasm
npx qipok your-component.wasm --suite parse_http_date.comply.wasm
Clear

7 of 437 cases

Case Name Expected Note Size
000022 full-batch-2000 Focused regression 0␊34304833␊68436866␊102741699␊136960132␊17126490… 2,000 dates in one call (60,000 bytes) 2,000 lines
000023 many-empty-lines Focused regression invalid␊invalid␊invalid␊invalid␊invalid␊invalid␊… 4,096 empty lines 4,096 lines
000024 max-output Focused regression invalid␊invalid␊invalid␊invalid␊invalid␊invalid␊… 65,536 empty lines give 524,288 bytes of output, the most any input can produce 65,536 lines
000025 max-input Focused regression -62167219200␊-62132828333␊-62098783066␊-62064478… Exactly 65,536 bytes: 2,184 dates and one invalid line 2,185 lines
000026 max-input-longest-output Focused regression -62167219200␊-62167219200␊-62167219200␊-62167219… Exactly 65,536 bytes of the longest timestamp, -62167219200 2,185 lines
000035 cpython-http2time-redos-1 CPython’s http.cookiejar tests invalid␊ A CPython http.cookiejar ReDoS regression, cut to fit one input. The test only checks that parsing finishes. 1 line
000036 cpython-http2time-redos-2 CPython’s http.cookiejar tests invalid␊ A CPython http.cookiejar ReDoS regression, cut to fit one input. The test only checks that parsing finishes. 1 line

Where these rules come from

RFC 9110 §5.6.7 defines HTTP-date in three forms: IMF-fixdate, the obsolete RFC 850 form and ANSI C asctime. Two-digit years use RFC 6265 §5.1.1’s fixed pivot, so the answers never depend on the clock. Every answer is agreed by a direct reading of the ABNF and by Python’s datetime; the suite’s own tests add V8’s Date#toUTCString. Of the 80,281 lines, 9,435 are valid.

Cases from other parsers’ tests list what each parser says beside every line. Where a parser accepts more than RFC 9110 allows, or reads a line differently, the case says why.