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

8 of 437 cases

Case Name Expected Note Size
000001 rfc9110-examples Focused regression 784111777␊784111777␊784111777␊ The three RFC 9110 §5.6.7 examples for 784111777 3 lines
000004 all-months-rfc850 Focused regression 1705280523␊1707962646␊1710471969␊1713154092␊1715… 12 lines
000007 all-weekdays-rfc850 Focused regression 1704067200␊1704153600␊1704240000␊1704326400␊1704… 7 lines
000009 rfc850-pivot-all-years Focused regression 961072245␊992608245␊1024144245␊1055680245␊108730… Every 2-digit year 00..99 100 lines
000020 time-of-day-edges Focused regression -86400␊-86400␊-86399␊-86399␊-82801␊-82801␊-43200… 84 lines
000030 go-parse-time Go’s net/http tests invalid␊invalid␊invalid␊784111777␊784111777␊7841… Go net/http's ParseTime tests. The answers match on every line. 6 lines
000031 httpdate-tests Rust httpdate’s tests 784111777␊784111777␊784111777␊1475419451␊invalid… The Rust httpdate crate's tests. The answers match on every line. 19 lines
000033 django-parse-http-date Django’s tests 784111777␊3155705377␊27074977␊784111777␊invalid␊… Django's parse_http_date tests. The answers match on 10 of 12 lines; 2 differ for the reason given beside them. 12 lines

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.