@@ -290,6 +290,17 @@ public void onNext(io.envoyproxy.envoy.service.ext_proc.v3.ProcessingResponse re
290290 }
291291 // 2. Client Message (Request Body)
292292 else if (response .hasRequestBody ()) {
293+ if (response .getRequestBody ().hasResponse ()
294+ && response .getRequestBody ().getResponse ().hasBodyMutation ()
295+ && response .getRequestBody ().getResponse ().getBodyMutation ().hasStreamedResponse ()
296+ && response .getRequestBody ().getResponse ().getBodyMutation ().getStreamedResponse ().getGrpcMessageCompressed ()) {
297+ io .grpc .StatusRuntimeException ex = io .grpc .Status .INTERNAL
298+ .withDescription ("gRPC message compression not supported in ext_proc" )
299+ .asRuntimeException ();
300+ requestObserver .onError (ex );
301+ onError (ex );
302+ return ;
303+ }
293304 handleRequestBodyResponse (response .getRequestBody ());
294305 }
295306 // 3. We don't send request trailers in gRPC for half close.
@@ -302,6 +313,17 @@ else if (response.hasResponseHeaders()) {
302313 }
303314 // 5. Server Message (Response Body)
304315 else if (response .hasResponseBody ()) {
316+ if (response .getResponseBody ().hasResponse ()
317+ && response .getResponseBody ().getResponse ().hasBodyMutation ()
318+ && response .getResponseBody ().getResponse ().getBodyMutation ().hasStreamedResponse ()
319+ && response .getResponseBody ().getResponse ().getBodyMutation ().getStreamedResponse ().getGrpcMessageCompressed ()) {
320+ io .grpc .StatusRuntimeException ex = io .grpc .Status .INTERNAL
321+ .withDescription ("gRPC message compression not supported in ext_proc" )
322+ .asRuntimeException ();
323+ requestObserver .onError (ex );
324+ onError (ex );
325+ return ;
326+ }
305327 handleResponseBodyResponse (response .getResponseBody (), wrappedListener );
306328 }
307329 // 6. Response Trailers Handshake Result
0 commit comments