nodeSolidServer / nodeSolidServer/node-solid-server

Unknown content types are served as text/plain

Open
#1,245 10 comments 0 reactions 1 assignee View on GitHub

@jaxoncreed is already working on this.

Since Jul 1, 2019.

test-case triage
Dominant language
JavaScript
Stars
1.8k
Forks
308
PR merge metrics
No merged PRs in 30d

Description

Please describe what you did in reproducible steps

Put foo and foo.ttl with no content-type specified. In both cases the server serves them as "text/plain"/

How did it work with 4.x series servers?

Unless I'm mis-remembering, it used to default to "text/turtle" for put of resources.

What happened when you tried the same with the 5.x series server?

It now defaults to "text/plain".

Any material that will help, logs, error messages, etc.

const auth = require('solid-auth-cli')
const base = "https://jeffz.solid.community/public/test/test-file"

async function main(){
  await auth.login()
  let res = await auth.fetch( base, {method:"PUT"} )
  console.log( res.headers.get("content-type") )
  res = await auth.fetch( base + ".ttl", {method:"PUT"} )
  console.log( res.headers.get("content-type") )
}
main()
// output :                                                                     
//                                                                              
// text/plain; charset=utf-8                                                    
// text/plain; charset=utf-8                                                    

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.