-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support cases where the request is done with transfer-encoding chunked (
#589) * Support cases where the request is done with transfer-encoding chunked PR #527 was put in place to fix an issue where an empty request body would cause an empty message to be sent down to the GRPC service (instead of failing). The fix at the time was to check that the ContentLength was >0, but this doesn't take into consideration transfer-encoding chunked POSTs. Since this patch all chunked POSTs no longer unmarshal the message (as the content-length was 0). My proposed fix is instead to always call Decode and simply ignore EOF errors (as we still want to pass the un-filled struct down). I have tested that things such as partial json blobs (something like '{') don' t return EOF (they have their own json error).
- Loading branch information
Showing
6 changed files
with
57 additions
and
84 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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