diff --git a/go/grpcweb/wrapper.go b/go/grpcweb/wrapper.go index a91ed69e..ab0e1b53 100644 --- a/go/grpcweb/wrapper.go +++ b/go/grpcweb/wrapper.go @@ -154,12 +154,8 @@ func (w *WrappedGrpcServer) handleWebSocket(wsConn *websocket.Conn, req *http.Re req.Body = wrappedReader req.Method = http.MethodPost req.Header = headers - req.ProtoMajor = 2 - req.ProtoMinor = 0 - contentType := req.Header.Get("content-type") - req.Header.Set("content-type", strings.Replace(contentType, "application/grpc-web", "application/grpc", 1)) - w.server.ServeHTTP(respWriter, req) + w.server.ServeHTTP(respWriter, hackIntoNormalGrpcRequest(req)) } // IsGrpcWebRequest determines if a request is a gRPC-Web request by checking that the "content-type" is diff --git a/ts/src/invoke.ts b/ts/src/invoke.ts index 27b13fb8..d3ec0bf5 100644 --- a/ts/src/invoke.ts +++ b/ts/src/invoke.ts @@ -45,6 +45,7 @@ export function invoke { diff --git a/ts/src/unary.ts b/ts/src/unary.ts index e2d0177e..75594a1b 100644 --- a/ts/src/unary.ts +++ b/ts/src/unary.ts @@ -57,6 +57,7 @@ export function unary {