Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipfs object get --encoding=protobufHTTP response returns wrong content type #2469

Closed
RichardLitt opened this issue Mar 15, 2016 · 2 comments · Fixed by #2516
Closed

ipfs object get --encoding=protobufHTTP response returns wrong content type #2469

RichardLitt opened this issue Mar 15, 2016 · 2 comments · Fixed by #2516
Assignees
Labels
kind/bug A bug in existing code (including security flaws) status/in-progress In progress

Comments

@RichardLitt
Copy link
Member

$ curl -i -X POST "http://localhost:5001/api/v0/object/get?arg=QmW2WQi7j6c7UgJTarActp7tDNikE4B2qXtFCfLPdsgaTQ&encoding=protobuf"
HTTP/1.1 200 OK
Access-Control-Allow-Headers: X-Stream-Output, X-Chunked-Output
Access-Control-Expose-Headers: X-Stream-Output, X-Chunked-Output
Content-Type: application/json
Server: go-ipfs/0.4.0-dev
Trailer: X-Stream-Error
Transfer-Encoding: chunked
Date: Tue, 15 Mar 2016 17:11:30 GMT
Transfer-Encoding: chunked

1
" ? :?^?E???p??\?|?.??t|d??U??cat.jpg?

The Content-Type should be application/protobuf, not application/json.

@RichardLitt
Copy link
Member Author

This should be fixed before merging ipfs-inactive/http-api-spec#32.

@RichardLitt RichardLitt added the kind/bug A bug in existing code (including security flaws) label Mar 20, 2016
@RichardLitt
Copy link
Member Author

Blocking ipfs-inactive/http-api-spec#67.

Stebalien added a commit to Stebalien/go-ipfs that referenced this issue Mar 30, 2016
It used to default to `application/json` but is now correctly set to
`application/protobuf`.

fixes ipfs#2469

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
Stebalien added a commit to Stebalien/go-ipfs that referenced this issue Mar 30, 2016
It used to default to `application/json` but is now correctly set to
`application/protobuf`.

fixes ipfs#2469

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
Stebalien added a commit to Stebalien/go-ipfs that referenced this issue Mar 30, 2016
It used to default to `application/json` but is now correctly set to
`application/protobuf`.

fixes ipfs#2469

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
Stebalien added a commit to Stebalien/go-ipfs that referenced this issue Mar 31, 2016
It used to default to `application/json` but is now correctly set to
`application/protobuf`.

fixes ipfs#2469

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
Stebalien added a commit to Stebalien/go-ipfs that referenced this issue Mar 31, 2016
It used to default to `application/json` but is now correctly set to
`application/protobuf`.

fixes ipfs#2469

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
Stebalien added a commit to Stebalien/go-ipfs that referenced this issue Mar 31, 2016
It used to default to `application/json` but is now correctly set to
`application/protobuf`.

fixes ipfs#2469

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
@Kubuxu Kubuxu added the status/in-progress In progress label May 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) status/in-progress In progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants