fix: respond to HEAD requests without a body - #17036
Conversation
|
Install the latest version of pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/11a48c940e37d5bb210d490a33ff9518b4034af1Open in |
🦋 Changeset detectedLatest commit: 11a48c9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: QUIET Plan: Advanced Run ID: 📒 Files selected for processing (2)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthrough
Merge Risk: ⚪ Minimal · up to Direct HEAD callers now receive bodyless responses while retaining response headers such as content-length. No current merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
Comment |
Server.respondreturnsHEADresponses with a body. The HTTP layer in front of it has always discarded that body, so nothing noticed untilServer.respondwas called directly.It now cancels the body and returns a bodiless copy of the response, after the dev-only error lookup keyed on the original response object. Headers, including
content-length, are kept.