NDJSON API endpoins should use application/x-ndjson Content-Type header
- Dominant language
- Go
- Stars
- 17.1k
- Forks
- 3.2k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 11
Description
#### Version information:
```
go-ipfs version: 0.4.5-
Repo version: 5
System version: amd64/darwin
Golang version: go1.7.4
```
#### Type: Bug
#### Priority: P2
#### Description:
Compare:
```
curl -D - "http://localhost:5001/api/v0/log/tail"
HTTP/1.1 200 OK
Access-Control-Allow-Headers: X-Stream-Output, X-Chunked-Output, X-Content-Length
Access-Control-Expose-Headers: X-Stream-Output, X-Chunked-Output, X-Content-Length
Content-Type: text/plain
Server: go-ipfs/0.4.5
Trailer: X-Stream-Error
Vary: Origin
X-Stream-Output: 1
Date: Wed, 01 Mar 2017 10:14:45 GMT
Transfer-Encoding: chunked
```
```
curl -D - "http://localhost:5001/api/v0/pubsub/sub?arg=&discover=false"
HTTP/1.1 200 OK
Access-Control-Allow-Headers: X-Stream-Output, X-Chunked-Output, X-Content-Length
Access-Control-Expose-Headers: X-Stream-Output, X-Chunked-Output, X-Content-Length
Content-Type: application/json
Server: go-ipfs/0.4.5
Trailer: X-Stream-Error
Vary: Origin
X-Chunked-Output: 1
Date: Wed, 01 Mar 2017 10:14:53 GMT
Transfer-Encoding: chunked
```
Not only they are different, they are both wrong as proper content type is `application/x-ndjson`.
Edited by Kubuxu
Contributor guide
Assessment
This issue has not been assessed yet.