Removing the "If-Modified-Since" request header when the cache is empty (as it causes issues) #104
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
octokat failed today on my machine because GitHub returned a 304 status code when the cache was empty. I think that sending an "If-Modified-Since" header is wrong when we don't expect a 304 response status. Removing the "If-Modified-Since" header in the request fixed my issue, that's why I am opening this pull request
Here is a js file with which you can reproduce the issue on node.js (after making sure the
co
andoctokat
npm packages are installed):Here is the output I got:
I tried with version 0.5.0-beta.0 of octokat but previous versions also failed in a different way (returning an empty string instead of an error).
Note that I have successfully used the octokat package several times with requests similar to this one, so this issue probably comes from a change on GitHub servers.
Thank you in advance for taking this pull request into account.
Thank you for the great work you are doing by providing octokat to the community!