Title: (Test) Persist Content-Type of resources by gobengo · Pull Request #159 · nodeSolidServer/node-solid-server · GitHub
Open Graph Title: (Test) Persist Content-Type of resources by gobengo · Pull Request #159 · nodeSolidServer/node-solid-server
X Title: (Test) Persist Content-Type of resources by gobengo · Pull Request #159 · nodeSolidServer/node-solid-server
Description: Currently this only adds two tests that fail, but I'd like some input as to whether it is a reasonable expectation of an LDP implementation that they would pass. They beg the question of whether an LDP server should remember the Content-Type of resources that are added to it. From http://www.w3.org/TR/ldp/#ldpc-container : 5.2.3.6 LDP servers should use the Content-Type request header to determine the request representation's format when the request has an entity body. The two tests are the same, but one each for 'text/plain' and 'application/json' resources. They Create a resource with that Content-Type (via PUT) Try to GET it with 'Accept: {contentType}' Assert that the response to the GET has 'Content-Type: {contentType}', which fails. Currently the Content-Type response header is 'application/octet-stream; charset=utf-8' (generic), unless the resource path ends in '.json', in which case it's JSON If these are tests that should pass, then it seems that one way of implementing this would be to automatically create a resource-name.meta resource when resource-name is created/updated (e.g. via PUT). If resource-name is PUT with Content-Type: text/plain, then this also creates resource-name.meta with some body that indicates that the canonical content type of resource-name is text/plain. Then, when someone does GET resource-name with a certain Accept header, ldnode can know whether it can respond with the resource in that Content Type. Right now resource-name and resource-name.meta files appear to be implicitly used together, but keeping them 'in sync' is expected to be done by the client the api. So this sort of consistency enforcement could, I guess, just be done by a proxy that sits in front of a 'dumb' ldnode. So the two questions Should these tests pass in an ideal implementation of LFDP? If yes, what's the best way to implement it in ldnode?
Open Graph Description: Currently this only adds two tests that fail, but I'd like some input as to whether it is a reasonable expectation of an LDP implementation that they would pass. They beg the question of whethe...
X Description: Currently this only adds two tests that fail, but I'd like some input as to whether it is a reasonable expectation of an LDP implementation that they would pass. They beg the question of wh...
Opengraph URL: https://github.com/nodeSolidServer/node-solid-server/pull/159
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:939e1801-006e-7eff-38bb-8679a47b662f |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B1AA:340321:ABA51D5:DDDAC4F:69766BC8 |
| html-safe-nonce | 7284acef85effadb0817e162862c8d35edcc3c7ded974a249153e708db206a0f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMUFBOjM0MDMyMTpBQkE1MUQ1OkREREFDNEY6Njk3NjZCQzgiLCJ2aXNpdG9yX2lkIjoiODgzNjk2NTMyMzA3OTk1NTkyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 5b389e8696b7bf10316ab256c94cd1bb4f8363a4d6b049d1f63ca2c03926c1dd |
| hovercard-subject-tag | pull_request:51484275 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/nodeSolidServer/node-solid-server/pull/159/files |
| twitter:image | https://avatars.githubusercontent.com/u/171782?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/171782?s=400&v=4 |
| og:image:alt | Currently this only adds two tests that fail, but I'd like some input as to whether it is a reasonable expectation of an LDP implementation that they would pass. They beg the question of whethe... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 032152924a283b83384255d9489e7b93b54ba01da8d380b05ecd3953b3212411 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/nodeSolidServer/node-solid-server git https://github.com/nodeSolidServer/node-solid-server.git |
| octolytics-dimension-user_id | 104446421 |
| octolytics-dimension-user_login | nodeSolidServer |
| octolytics-dimension-repository_id | 24306004 |
| octolytics-dimension-repository_nwo | nodeSolidServer/node-solid-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24306004 |
| octolytics-dimension-repository_network_root_nwo | nodeSolidServer/node-solid-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5b577f6be6482e336e3c30e8daefa30144947b17 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width