diff --git a/proxy/plugin/modify_chunk_response.py b/proxy/plugin/modify_chunk_response.py index 56ffeacc2b..440a63d852 100644 --- a/proxy/plugin/modify_chunk_response.py +++ b/proxy/plugin/modify_chunk_response.py @@ -45,8 +45,9 @@ def handle_upstream_chunk(self, chunk: memoryview) -> memoryview: self.response.parse(chunk.tobytes()) # If response is complete, modify and dispatch to client if self.response.state == httpParserStates.COMPLETE: - # Avoid setting a body for responses where content is not expected - if self.response.content_expected(): + # Avoid setting a body for responses where a body is not expected. + # Otherwise, example curl will report warnings. + if self.response.body_expected(): self.response.body = b'\n'.join(self.DEFAULT_CHUNKS) + b'\n' self.client.queue(memoryview(self.response.build_response())) return memoryview(b'')