{"action":"reopened","issue":{"url":"https://api.github.com/repos/linkeddata/gold/issues/62","labels_url":"https://api.github.com/repos/linkeddata/gold/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/linkeddata/gold/issues/62/comments","events_url":"https://api.github.com/repos/linkeddata/gold/issues/62/events","html_url":"https://github.com/linkeddata/gold/issues/62","id":123187792,"number":62,"title":"Relaxing the restriction to allow POST to create new resources, regardless of their mime types","user":{"login":"csarven","id":429987,"avatar_url":"https://avatars.githubusercontent.com/u/429987?v=3","gravatar_id":"","url":"https://api.github.com/users/csarven","html_url":"https://github.com/csarven","followers_url":"https://api.github.com/users/csarven/followers","following_url":"https://api.github.com/users/csarven/following{/other_user}","gists_url":"https://api.github.com/users/csarven/gists{/gist_id}","starred_url":"https://api.github.com/users/csarven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csarven/subscriptions","organizations_url":"https://api.github.com/users/csarven/orgs","repos_url":"https://api.github.com/users/csarven/repos","events_url":"https://api.github.com/users/csarven/events{/privacy}","received_events_url":"https://api.github.com/users/csarven/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/linkeddata/gold/labels/new%20feature","name":"new feature","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-12-20T22:54:34Z","updated_at":"2015-12-24T14:12:56Z","closed_at":null,"body":"Trying to `HTTP POST` with Content-Type `text/html` and the data being HTML+RDFa, returns `HTTP 415`.\r\n\r\ne.g:\r\n\r\n`curl -v -X POST -H'Content-Type: text/html; charset=utf-8' -H'Link: <http://www.w3.org/ns/ldp#Resource>, rel=\"type\"' -H\"Slug: x.html\" https://example.org/ --data '<html></html>'`\r\n\r\nI've also tried it with `ldp:NonRDFSource` but still `HTTP 415`.\r\n\r\n`https://example.org/` is a `ldp:BasicContainer`.\r\n\r\nIs Gold's implementation related to this (from the LDP Rec):\r\n\r\n> \"6.2.1 LDP servers can support representations beyond those necessary to conform to this specification. These could be other RDF formats, like N3 or NTriples, but non-RDF formats like HTML [HTML401] and JSON [RFC4627] would likely be common. HTTP content negotiation ([RFC7231] Section 3.4 - Content Negotiation) is used to select the format.\"\r\n\r\nI think it is getting tripped over this:\r\n\r\nhttps://github.com/linkeddata/gold/blob/40e5ee4172f308f56eee29b06cfbe51aa6a4cd5b/server.go#L272\r\n\r\nand because of not listing `text/html` as one of the mimeParsers:\r\n\r\nhttps://github.com/linkeddata/gold/blob/40e5ee4172f308f56eee29b06cfbe51aa6a4cd5b/mime.go#L14\r\n\r\nHTML+RDFa is an `ldp:RDFSource`. Of course whether the HTML includes RDF(a) or not - HTML could also include Turtle or JSON-LD in `<script>` - can't be known without looking at the content, so there is some reliance on the `text/html` or `application/xhtml+xml` mediatypes. Besides, the spec is pointing at HTML 4.01 (which is rather archaic, but that may be need to be mentioned in an errata). "}}