This repository has been archived by the owner on Apr 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 173
Fix caching on JSON body read #104
Open
m4ns0ur
wants to merge
1
commit into
gregjones:master
Choose a base branch
from
m4ns0ur:fix-json-eof
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When response is JSON and it doesn't have Content-length header and Transfer-encoding header is not chunked, reader will use bufio where we miss the EOF and it never set the refreshed cache. This fix will check the read length besides EOF err.
We've experience the issue described in the linked issue of go-github. Is there any reason this wasn't merged in? |
@dmitshur - Do you have powers to merge this? Without it, we are forced to use the forked version of the repo as you can see in the linked PR. |
Can this be merged? I have been forced to use the forked version! |
I'll add another voice to this, as I'm hitting the same issue. |
idefixcert
approved these changes
Feb 3, 2021
I tried this fix but I get the following error when executing the testcases:
|
@idefixcert tests are passing for me
Which version do you have? It seems you have this issue: golang/go#40735 |
your right, that was the problem. |
1 task
Closed
whywaita
added a commit
to whywaita/myshoes
that referenced
this pull request
Jan 17, 2022
saschagrunert
added a commit
to saschagrunert/release-sdk
that referenced
this pull request
Jun 13, 2022
The httpcache transport is breaking authentication where no fix seems to be implemented yet. I'd propose to revert the change for now to be able to use authenticated requests in tools like `k/release/cmd/release-notes`. Refers to: google/go-github#1503, gregjones/httpcache#104 Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
Repository owner
deleted a comment from
yuriy-yarosh
Aug 11, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
When response is JSON and it doesn't have Content-length header
and Transfer-encoding header is not chunked, reader will use bufio
where we miss the EOF and it never set the refreshed cache.
This fix will check the read length besides EOF err.