Title: conneg: HEAD ignores the Accept header — content-type diverges from GET on the same resource · Issue #552 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: conneg: HEAD ignores the Accept header — content-type diverges from GET on the same resource · Issue #552 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: conneg: HEAD ignores the Accept header — content-type diverges from GET on the same resource · Issue #552 · JavaScriptSolidServer/JavaScriptSolidServer
Description: Found while live-verifying #71. Gap GET runs content negotiation correctly (q-weights, listed order — fixed by #325), but HEAD on the same resource returns the stored content type regardless of the Accept header: # resource: /public/test...
Open Graph Description: Found while live-verifying #71. Gap GET runs content negotiation correctly (q-weights, listed order — fixed by #325), but HEAD on the same resource returns the stored content type regardless of the...
X Description: Found while live-verifying #71. Gap GET runs content negotiation correctly (q-weights, listed order — fixed by #325), but HEAD on the same resource returns the stored content type regardless of the...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/552
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"conneg: HEAD ignores the Accept header — content-type diverges from GET on the same resource","articleBody":"Found while live-verifying #71.\n\n## Gap\n\n`GET` runs content negotiation correctly (q-weights, listed order — fixed by #325), but `HEAD` on the same resource returns the stored content type regardless of the `Accept` header:\n\n```bash\n# resource: /public/test.jsonld (stored as JSON-LD), server with --conneg\n\n# GET negotiates:\ncurl -s /public/test.jsonld -H 'Accept: text/turtle, application/ld+json' \\\n -o /dev/null -w \"%{content_type}\" # → text/turtle ✓\n\n# HEAD does not:\ncurl -sI /public/test.jsonld -H 'Accept: text/turtle, application/ld+json' \\\n | grep -i content-type # → application/ld+json ✗\n```\n\nRFC 9110 §9.3.2: \"The server SHOULD send the same header fields in response to a HEAD request as it would have sent if the request method had been GET.\" Clients that probe with HEAD before fetching (caches, link checkers, conneg-aware clients) see a content type the subsequent GET won't return.\n\n## Notable\n\n#71's original repro used `curl -I` (HEAD) — so the literal repro command \"passes\" today only coincidentally: HEAD returns the stored type, which happens to be what that Accept header prefers for a JSON-LD-stored resource.\n\n## Likely shape\n\n`handleHead` in `src/handlers/resource.js` presumably takes a cheaper path that skips the conneg branch `handleGet` runs. Fix is probably routing HEAD through the same content-type selection (without the body work), or extracting the negotiation into a shared helper both use.\n\n## Related\n\n- #71 — the GET-side priority bug, verified fixed (by #325), closing with findings\n- #460 — extensionless resources serve `application/octet-stream` ignoring Accept entirely (separate, already-tracked coupling between stored extension and served type)","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-06-10T19:28:49Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/552"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:338b89b0-c68d-747d-1284-f6eab0cfb4c9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BDCC:24E38:175766:1EB843:6B0398CB |
| html-safe-nonce | ee0b02e698fda8d04091a1283f70a695e18297d49ef4657ba9d11fffa87ff51b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRENDOjI0RTM4OjE3NTc2NjoxRUI4NDM6NkIwMzk4Q0IiLCJ2aXNpdG9yX2lkIjoiMjQ0OTAzODM4MDI5ODkwMTcwNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f600ea2c2a4a87007919dad7ce573c65149c5a84bbedbfbc458a8fcbe2d53e2c |
| hovercard-subject-tag | issue:4634335302 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaScriptSolidServer/JavaScriptSolidServer/552/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4a6f980c578f4efa6ef8e1b0e8809be75ebd108f74ecd77fa42f1b0565cd58a5/JavaScriptSolidServer/JavaScriptSolidServer/issues/552 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4a6f980c578f4efa6ef8e1b0e8809be75ebd108f74ecd77fa42f1b0565cd58a5/JavaScriptSolidServer/JavaScriptSolidServer/issues/552 |
| og:image:alt | Found while live-verifying #71. Gap GET runs content negotiation correctly (q-weights, listed order — fixed by #325), but HEAD on the same resource returns the stored content type regardless of the... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | melvincarvalho |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git |
| octolytics-dimension-user_id | 205442424 |
| octolytics-dimension-user_login | JavaScriptSolidServer |
| octolytics-dimension-repository_id | 958025407 |
| octolytics-dimension-repository_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 958025407 |
| octolytics-dimension-repository_network_root_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width