Skip to content

Commit b09b6a1

Browse files
committed
Fixed body in 304 response to etag request
RFC 7232 section 4.1 prohibits a message-body in a 304 response.
1 parent 2b886af commit b09b6a1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ def etag(self, env, start_response):
6464
headers = [("Etag", self.etag_string)]
6565
if env.get("HTTP_IF_NONE_MATCH") == self.etag_string:
6666
start_response("304 Not Modified", headers)
67+
return []
6768
else:
6869
start_response("200 OK", headers)
6970
return [pformat(env).encode("utf8")]

0 commit comments

Comments
 (0)