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
PR grpc-ecosystem#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