Skip to content

Commit

Permalink
fix: grpc web proxy must ensure to read full header (argoproj#6319)
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Matyushentsev <[email protected]>
  • Loading branch information
Alexander Matyushentsev authored May 26, 2021
1 parent 32f60d3 commit aad1a26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/apiclient/grpcproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func (c *client) startGRPCProxy() (*grpc.Server, net.Listener, error) {

for {
header := make([]byte, frameHeaderLength)
if _, err := resp.Body.Read(header); err != nil {
if _, err := io.ReadAtLeast(resp.Body, header, frameHeaderLength); err != nil {
if err == io.EOF {
err = io.ErrUnexpectedEOF
}
Expand Down

0 comments on commit aad1a26

Please sign in to comment.