René's URL Explorer Experiment


Title: Without --conneg, reject non-JSON-LD PUTs with 415 instead of silently storing · Issue #295 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub

Open Graph Title: Without --conneg, reject non-JSON-LD PUTs with 415 instead of silently storing · Issue #295 · JavaScriptSolidServer/JavaScriptSolidServer

X Title: Without --conneg, reject non-JSON-LD PUTs with 415 instead of silently storing · Issue #295 · JavaScriptSolidServer/JavaScriptSolidServer

Description: The inconsistency JSS is "JSON-LD native" by design — `--conneg` is off by default (`src/config.js:29`: `conneg: false`). The stance is: if you want to read/write Turtle, opt in explicitly. But the PUT handler today doesn't enforce that ...

Open Graph Description: The inconsistency JSS is "JSON-LD native" by design — `--conneg` is off by default (`src/config.js:29`: `conneg: false`). The stance is: if you want to read/write Turtle, opt in explicitly. But the...

X Description: The inconsistency JSS is "JSON-LD native" by design — `--conneg` is off by default (`src/config.js:29`: `conneg: false`). The stance is: if you want to read/write Turtle, opt in explicitl...

Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/295

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Without --conneg, reject non-JSON-LD PUTs with 415 instead of silently storing","articleBody":"## The inconsistency\n\nJSS is \\\"JSON-LD native\\\" by design — \\`--conneg\\` is **off** by default (\\`src/config.js:29\\`: \\`conneg: false\\`). The stance is: if you want to read/write Turtle, opt in explicitly.\n\nBut the PUT handler today doesn't enforce that stance. Looking at \\`src/handlers/resource.js:638-647\\`:\n\n\\`\\`\\`js\nconst inputType = contentType.split(';')[0].trim().toLowerCase();\nif (connegEnabled && (inputType === RDF_TYPES.TURTLE || inputType === RDF_TYPES.N3)) {\n  try {\n    const jsonLd = await toJsonLd(content, contentType, resourceUrl, connegEnabled);\n    content = Buffer.from(JSON.stringify(jsonLd, null, 2));\n  } catch (e) { /* 400 */ }\n}\n// … goes on to storage.write(storagePath, content) unconditionally\n\\`\\`\\`\n\nSo with \\`--conneg\\` **off**:\n- Client PUTs \\`Content-Type: text/turtle\\` body.\n- The if-block is skipped (conneg disabled).\n- \\`content\\` is still the raw Turtle bytes.\n- JSS writes those bytes to disk at, say, \\`foo.jsonld\\` → now the file on disk is Turtle content with a \\`.jsonld\\` URL.\n- Subsequent GET: JSS reads the file, \\`getContentType()\\` sees \\`.jsonld\\` → says \\`application/ld+json\\`. Serves Turtle bytes with a JSON-LD content-type header. Parser on the client errors.\n\nSo \\`--conneg=false\\` + Turtle PUT = silent corruption.\n\n## Proposal\n\nWhen \\`--conneg\\` is off, reject non-JSON-LD PUT bodies on RDF routes with \\`415 Unsupported Media Type\\` and an \\`Accept-Post\\` / \\`Accept-Patch\\` header listing \\`application/ld+json\\`. Makes the server's contract explicit:\n\n> \\\"I am JSON-LD native. Start me with \\`--conneg\\` if you want Turtle / N3 translation.\\\"\n\nRough shape:\n\n\\`\\`\\`js\nconst rdfInputTypes = [RDF_TYPES.JSON_LD, 'application/json'];\nif (!connegEnabled && contentType && !rdfInputTypes.includes(inputType) && looksLikeRdfResource(resourceUrl)) {\n  return reply\n    .code(415)\n    .header('Accept', 'application/ld+json')\n    .send({ error: 'Unsupported Media Type',\n            message: 'This server is JSON-LD native. Start with --conneg to accept text/turtle or text/n3.' });\n}\n\\`\\`\\`\n\n\\`looksLikeRdfResource()\\` is the small new helper — e.g. extension in \\`{.jsonld, .json, .ttl, .n3, .acl, .meta}\\`, or no extension and path looks like a Solid resource (profile/card, …). Out of scope to get exhaustive; start with the common set.\n\n## Non-goals\n\n- Not changing default mode. \\`conneg: false\\` stays the default.\n- Not changing behaviour when \\`--conneg\\` is on — that path is fine (translation happens).\n- Not touching binary / non-RDF uploads (images, text, etc.). The guard is specifically for RDF-shaped resources.\n\n## Why not fold this into #294\n\n- \\#294 fixes a visible interop break (umai 500s today). This is a latent purity tightening.\n- Conflating them risks \\#294 stalling on 415-design bikeshed. Better: ship \\#294 first (unblocks real users), ship this after.\n- Different reviewers might also weigh in differently — #294 is clearly right, this involves a stance call.\n\n## Scope\n\n~20 lines in \\`handlePut\\` + a helper. Plus one test per rejected case. Small, but touches the PUT path, so the full suite is worth running.\n\nHappy to PR after #294.","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-04-22T11:09:59Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/295"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:ed9f8025-322a-bba9-cf6a-b9d57049fbe8
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id932E:20B2A8:B3A2CC:EF987B:6B03D07C
html-safe-nonced42863315347bd98803a036ea2a801f85bc6aced26a035e603f09fe44d281dba
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MzJFOjIwQjJBODpCM0EyQ0M6RUY5ODdCOjZCMDNEMDdDIiwidmlzaXRvcl9pZCI6IjM4MTM3NDkxODA0NDc1NzYxODgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacf4df4bf2f16e65ffcce0a0563fd251bf42f400d71cb44497fb938279786ee501
hovercard-subject-tagissue:4308550460
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaScriptSolidServer/JavaScriptSolidServer/295/issue_layout
twitter:imagehttps://opengraph.githubassets.com/054354c7e02e1d9b4517183ddf9ff7ede9a33222de09e0ce4600ac4b76732c72/JavaScriptSolidServer/JavaScriptSolidServer/issues/295
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/054354c7e02e1d9b4517183ddf9ff7ede9a33222de09e0ce4600ac4b76732c72/JavaScriptSolidServer/JavaScriptSolidServer/issues/295
og:image:altThe inconsistency JSS is "JSON-LD native" by design — `--conneg` is off by default (`src/config.js:29`: `conneg: false`). The stance is: if you want to read/write Turtle, opt in explicitly. But the...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemelvincarvalho
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
go-importgithub.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git
octolytics-dimension-user_id205442424
octolytics-dimension-user_loginJavaScriptSolidServer
octolytics-dimension-repository_id958025407
octolytics-dimension-repository_nwoJavaScriptSolidServer/JavaScriptSolidServer
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id958025407
octolytics-dimension-repository_network_root_nwoJavaScriptSolidServer/JavaScriptSolidServer
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/295#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FJavaScriptSolidServer%2FJavaScriptSolidServer%2Fissues%2F295
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FJavaScriptSolidServer%2FJavaScriptSolidServer%2Fissues%2F295
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=JavaScriptSolidServer%2FJavaScriptSolidServer
Reloadhttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/295
Reloadhttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/295
Reloadhttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/295
JavaScriptSolidServerhttps://github.com/JavaScriptSolidServer
JavaScriptSolidServerhttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer
Codehttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer
Issues165 (165)https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues
Pull requests14 (14)https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pulls
Actionshttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/actions
Projectshttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/projects
Security and qualityhttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/security
Insightshttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/insights
https://github.com/JavaScriptSolidServer/JavaScriptSolidServer
New issuehttps://github.com/login?return_to=https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/295
New issuehttps://github.com/login?return_to=https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/295
#339https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/339
Without --conneg, reject non-JSON-LD PUTs with 415 instead of silently storinghttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/295#top
#339https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/339
https://github.com/melvincarvalho
melvincarvalhohttps://github.com/melvincarvalho
on Apr 22, 2026https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/295#issue-4308550460
#294https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/294
Conneg: .meta and .acl files are not recognized as RDF, break Turtle-native clients #294https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/294
Conneg: .meta and .acl files are not recognized as RDF, break Turtle-native clients #294https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/294
Conneg: .meta and .acl files are not recognized as RDF, break Turtle-native clients #294https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/294
Conneg: .meta and .acl files are not recognized as RDF, break Turtle-native clients #294https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/294
#294https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/294
melvincarvalhohttps://github.com/melvincarvalho
on Apr 22, 2026https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/295#event-24752970471
Recognise .acl and .meta as RDF resources for conneg (#294)https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/commit/de02f15674da3c8b1fdcd337410e1272f0056809
#294https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/294
de02f15https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/commit/de02f15674da3c8b1fdcd337410e1272f0056809
melvincarvalhohttps://github.com/melvincarvalho
on Apr 30, 2026https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/295#event-25019835751
Address Copilot review on #295https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/commit/fd411e3573f4f5d9f13e469db2064151ae9927f5
#295https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/295
fd411e3https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/commit/fd411e3573f4f5d9f13e469db2064151ae9927f5
Address Copilot round-2 review on #295https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/commit/388f31ebb88f9025b5aa53195876548f10387e37
#295https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/295
388f31ehttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/commit/388f31ebb88f9025b5aa53195876548f10387e37
Address Copilot round-3 review on #295https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/commit/67571c6cc5dfb20bad651af6e781a04062ba3e16
#295https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/295
67571c6https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/commit/67571c6cc5dfb20bad651af6e781a04062ba3e16
Address Copilot round-4 review on #295https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/commit/04b22eeec0653d75d4eee654dd36d15eee637702
#295https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/295
04b22eehttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/commit/04b22eeec0653d75d4eee654dd36d15eee637702
Address Copilot round-5 review on #295https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/commit/9aca012fd4be38f17b23b7554472321df0e44df5
#295https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/295
9aca012https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/commit/9aca012fd4be38f17b23b7554472321df0e44df5
Address Copilot round-6 review on #295https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/commit/dab7b0f5f46f2809471834af7a4fb51d39c0aba6
#295https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/295
dab7b0fhttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/commit/dab7b0f5f46f2809471834af7a4fb51d39c0aba6
Address Copilot round-7 review on #295https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/commit/c36885aefd50e30a1a613a5f1aa6f491437b1481
#295https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/295
c36885ahttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/commit/c36885aefd50e30a1a613a5f1aa6f491437b1481
Address Copilot round-8 review on #295https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/commit/01415d8a9f0bf590ea5c64c8e5c753d840335b08
#295https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/295
01415d8https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/commit/01415d8a9f0bf590ea5c64c8e5c753d840335b08
Address Copilot round-9 review on #295https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/commit/03de3cc365014ef114d5e3bada0c983dd60d15a7
#295https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/295
03de3cchttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/commit/03de3cc365014ef114d5e3bada0c983dd60d15a7
melvincarvalhohttps://github.com/melvincarvalho
completedhttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#339https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/339
on Apr 30, 2026https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/295#event-25021499998
melvincarvalhohttps://github.com/melvincarvalho
on Apr 30, 2026https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/295#event-25021500010
Reject non-JSON-LD PUT on .acl resources (#295) (#339)https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/commit/87c661abb251fdd7aa98ab93f86fcea2ecc4afb8
#295https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/295
#339https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/339
87c661ahttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/commit/87c661abb251fdd7aa98ab93f86fcea2ecc4afb8
Sign up for freehttps://github.com/signup?return_to=https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/295
Sign in to commenthttps://github.com/login?return_to=https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/295
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.