ReviewOS

home-lang/home

Port Express redirect response contracts

#225
Closed chris opened this 10 days ago ·
10 days ago

Context

The sequential Bun corpus frontier is js/third_party/express/res.redirect.test.ts at position 3967/4708, following Location handling in #224. This contributes to #66.

Acceptance criteria

  • res.redirect(url) defaults to 302 and the status overload preserves explicit redirect codes.
  • Redirect locations reuse URI-safe encoding and existing percent-octet preservation.
  • HEAD suppresses response bodies.
  • Accept negotiation returns safe text/HTML bodies or an empty body with correct headers and status reason.
  • The copied suite passes with existing todos and is pinned in the permanent third-party gate.
10 days ago

Completed on main in ab75a32.

res.redirect() now supports default and explicit status codes, reuses percent-preserving Location encoding, emits canonical redirect reason text, negotiates safe HTML/text/empty responses from Accept, sets correct content metadata, and suppresses HEAD bodies without losing the computed length.

Verification: focused position 3967 reports files=1, passed=9, todo=4, failed=0, unsupported=0, allowed-empty=0; all permanent copied-corpus, SQL, and third-party gates pass.

Sign in to comment on this issue.