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

Correctly set the content type for object get --encoding=protobuf #2516

Merged
merged 1 commit into from
May 29, 2016

Conversation

Stebalien
Copy link
Member

It used to default to application/json but is now correctly set to
application/protobuf.

fixes #2469

License: MIT
Signed-off-by: Steven Allen [email protected]

@Stebalien
Copy link
Member Author

Unfortunately, I have no idea why my test cases are failing. They when I run them manually.

'

test_expect_success "'ipfs object get --encoding=json' returns the correct content type" '
HASH="QmWkHFpYBZ9mpPRreRbMhhYWXfUhBAue3JkbbpFqwowSRb" &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to re-set the HASH variable in each scope. shell variables like this are global(ish)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what I did the first time around but it still failed.

Steven Allen

@Stebalien Stebalien force-pushed the protobuf-content-type branch 2 times, most recently from 8b2a8b4 to 2e9d36a Compare March 31, 2016 00:21
@Stebalien
Copy link
Member Author

Unfortunately, I have no idea why my test cases are failing. They when I run them manually.

I didn't realize those tests were run offline as well...

@Stebalien
Copy link
Member Author

I'm pretty sure the other failing tests are not my fault.

@RichardLitt
Copy link
Member

Also subscribing.

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 <[email protected]>
@whyrusleeping
Copy link
Member

@noffle i assigned another related PR to you, so i'm gonna assign this one as well

@Kubuxu
Copy link
Member

Kubuxu commented May 17, 2016

LGTM, the change looks much bigger than it is because golang indenting changes but it is really very small change.

@Stebalien Stebalien closed this May 25, 2016
@Stebalien Stebalien reopened this May 25, 2016
@Kubuxu Kubuxu added the RFM label May 25, 2016
@whyrusleeping
Copy link
Member

LGTM, great to finally have this merged in

@whyrusleeping whyrusleeping merged commit 6c33503 into ipfs:master May 29, 2016
@RichardLitt
Copy link
Member

Does this only apply to object get?

RichardLitt added a commit to ipfs-inactive/http-api-spec that referenced this pull request May 30, 2016
@Stebalien
Copy link
Member Author

@RichardLitt Yes. Are there any other endpoints that return protocol buffers?

@RichardLitt
Copy link
Member

@Stebalien Looked again; not that I could see. Sweet.

@Stebalien Stebalien deleted the protobuf-content-type branch July 12, 2017 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ipfs object get --encoding=protobufHTTP response returns wrong content type
5 participants