Repository navigation
fix: res.location('back') alias, compat=4 .js mime type - #31
Merged
Merged
Conversation
- res.location('back')/res.redirect('back') was sent as the literal
string 'back' instead of resolving to the Referrer/Referer header
(falling back to '/'). Express 5 dropped this alias entirely -- a
literal 'back' really is sent as-is there -- so this is compat=4 only.
- lookupMimeType('js') returned 'text/javascript' unconditionally.
That's the current mime-db entry, but Express 4 predates the
IANA/WHATWG registration change and used the older
'application/javascript'. withCharset() also didn't know that type
needed a charset appended (it only recognized text/*, application/json
and image/svg+xml).
Express suite: 1108/8 unchanged (v5). 1151/47 -> ... this branch is off
main, so measured against main's own baseline (1198 total, 51 failing):
1151/47, 4 fewer failing.
otnc
added a commit
that referenced
this pull request
Sep 11, 2026
Resolves the conflict from #31 merging first (both touched README.md's status line and the express-suite baseline). Numbers recomputed by rerunning both suites fresh against the combined source.
6 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Based on `main` directly (not stacked on #30, which is still open) to keep this PR's scope independent.
Test plan
Note
Per your instructions, this PR is not merged -- ready for your review.