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

Default If-Modified-Since header causes response to be empty #106

Closed
philbooth opened this issue Jul 13, 2016 · 3 comments
Closed

Default If-Modified-Since header causes response to be empty #106

philbooth opened this issue Jul 13, 2016 · 3 comments

Comments

@philbooth
Copy link

At some point during May or June, requests to get my commit histories for individual repos started returning empty response bodies. I've only just got round to debugging it now, but it appears that GitHub no longer likes the default value octokat.js sends for the If-Modified-Since header.

The problem can easily be reproduced using curl. This request correctly returns my commit history:

curl -v -X GET -H "Accept: application/vnd.github.v3+json" -H "User-Agent: octokat.js" "https://api.github.com/repos/mozilla/fxa-auth-server/commits?author=philbooth"

Whereas this request, identical except for the additional If-Modified-Since header, returns an empty body (but still succeeds):

curl -v -X GET -H "Accept: application/vnd.github.v3+json" -H "User-Agent: octokat.js" -H "If-Modified-Since: Thu, 01 Jan 1970 00:00:00 GMT" "https://api.github.com/repos/mozilla/fxa-auth-server/commits?author=philbooth"

I appreciate you haven't made any changes that caused this, but I was wondering if it would be possible to default to no If-Modified-Since header instead of sending it the epoch?

I'm not sure how to report issues with the API to GitHub but if I find out I will also raise this with them.

@philschatz
Copy link
Owner

Thanks for reporting! I think #104 should fix this issue; could you try checking out the master branch and building locally (since the PR was merged) and see if that fixes your issue?

@philbooth
Copy link
Author

Yep, that fix works for me.

@philschatz
Copy link
Owner

Thanks! Also, the fix is in v0.4.18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants