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

All 437 cases

Case Name Expected Note Size
000000 empty Focused regression empty input gives empty output 0 lines
000001 rfc9110-examples Focused regression 784111777␊784111777␊784111777␊ The three RFC 9110 §5.6.7 examples for 784111777 3 lines
000002 epoch-and-extremes Focused regression -62167219200␊-62162078400␊-62135596800␊-1␊0␊2147… Proleptic Gregorian extremes and Y2038 boundary 10 lines
000003 all-months-imf Focused regression 1705280523␊1707962646␊1710471969␊1713154092␊1715… 12 lines
000004 all-months-rfc850 Focused regression 1705280523␊1707962646␊1710471969␊1713154092␊1715… 12 lines
000005 all-months-asctime Focused regression 1704070923␊1706753046␊1709262369␊1711944492␊1714… 12 lines
000006 all-weekdays-imf Focused regression 1704067200␊1704153600␊1704240000␊1704326400␊1704… 7 lines
000007 all-weekdays-rfc850 Focused regression 1704067200␊1704153600␊1704240000␊1704326400␊1704… 7 lines
000008 all-weekdays-asctime 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
000010 leap-years Focused regression -11670998400␊951868799␊1709208000␊13574563200␊95… 12 lines
000011 month-ends Focused regression 1675209599␊invalid␊invalid␊invalid␊1677628799␊in… The last day of every month, and the day after it with the weekday it would roll over to 48 lines
000012 wrong-weekdays Focused regression invalid␊invalid␊invalid␊invalid␊invalid␊invalid␊… 18 lines
000013 invalid-syntax-and-bounds Focused regression invalid␊invalid␊invalid␊invalid␊invalid␊invalid␊… 36 lines
000014 asctime-day-padding Focused regression 783679777␊783679777␊784111777␊784111777␊78437097… RFC 9110 date3 allows both `Nov 6` and `Nov 06` 13 lines
000015 mixed-formats Focused regression invalid␊invalid␊invalid␊invalid␊invalid␊invalid␊… 19 lines
000016 name-near-misses Focused regression invalid␊778841377␊invalid␊invalid␊invalid␊invali… 19 lines
000017 non-ascii-digits-and-signs Focused regression invalid␊invalid␊invalid␊invalid␊invalid␊invalid␊… 15 lines
000018 whitespace-variants Focused regression invalid␊invalid␊invalid␊invalid␊invalid␊invalid␊… 11 lines
000019 pre-epoch-weekdays Focused regression -604800␊-518401␊-518400␊-432001␊-432000␊-345601␊… Every weekday just before 1970, and leap-rule years far before it 38 lines
000020 time-of-day-edges Focused regression -86400␊-86400␊-86399␊-86399␊-82801␊-82801␊-43200… 84 lines
000021 32-bit-boundaries Focused regression -2147483649␊-2147483648␊2147483647␊2147483648␊42… Values a 32-bit signed or unsigned timestamp can't hold 11 lines
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
000027 rfc9110-every-example RFC 9110 1248697733␊1248290156␊784111777␊784111777␊784111… Every HTTP-date RFC 9110 shows. The answers match on 18 of 19 lines; 1 differs for the reason given beside it. 19 lines
000028 rfc9111-every-example RFC 9111 786297600␊ Every HTTP-date RFC 9111 shows. The answers match on every line. 1 line
000029 rfc6265-every-example RFC 6265 1623233894␊784111777␊ Every cookie Expires date RFC 6265 shows. The answers match on every line. 2 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
000032 curl-getdate curl’s tests invalid␊invalid␊invalid␊invalid␊invalid␊78411177… curl's curl_getdate tests (lib517). The answers match on 62 of 193 lines; 131 more are lines curl accepts but RFC 9110 doesn't. 193 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
000034 cpython-http2time CPython’s http.cookiejar tests 760233600␊invalid␊invalid␊760233600␊invalid␊inva… CPython http.cookiejar's http2time tests. The answers match on 16 of 56 lines; 40 more are lines CPython accepts but RFC 9110 doesn't. 56 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
000037 gen-0000 Generated 1673281885␊1939617128␊2506009551␊-24026531853␊22… 13 lines
000038 gen-0001 Generated invalid␊invalid␊invalid␊92330026␊219218515454␊in… 12 lines
000039 gen-0002 Generated 1691052250␊-42051520569␊invalid␊2118773575␊inval… 14 lines
000040 gen-0003 Generated 51652877232␊209691171085␊861107014␊14575902993␊i… 7 lines
000041 gen-0004 Generated 14783173053␊2112848314␊1926809231␊-28230473434␊6… 15 lines
000042 gen-0005 Generated invalid␊115913831001␊1298053150␊53037359291␊1736… 7 lines
000043 gen-0006 Generated 1896838538␊invalid␊11538360330␊1807328980␊173174… 7 lines
000044 gen-0007 Generated -25738609947␊invalid␊invalid␊invalid␊invalid␊181… 7 lines
000045 gen-0008 Generated invalid␊1552311717␊208818019702␊invalid␊invalid␊… 10 lines
000046 gen-0009 Generated 67733064990␊170701440␊invalid␊invalid␊1587020933… 12 lines
000047 gen-0010 Generated 861970958␊-48704338786␊186501233768␊1273713182␊9… 16 lines
000048 gen-0011 Generated 44923536787␊240881833314␊ 2 lines
000049 gen-0012 Generated 203420418␊ 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.