Skip HTTP 100 Continue test - invalid per RFC 7231

HTTP 100 Continue is an informational response that must be followed
by a final response. Testing it as a final response is invalid HTTP.
This commit is contained in:
Benoit Chesneau 2026-04-03 23:13:27 +02:00
parent 9c2bedceb7
commit 746cc049d0

View File

@ -73,11 +73,12 @@ class TestHttpResponseStatus:
response = await http_client.get(f"/status/{code}")
assert response.status_code == code
@pytest.mark.skip(reason="HTTP 100 Continue cannot be a final response per RFC 7231")
async def test_status_100_continue(self, http_client):
"""Handle 100 status (may not be supported by all frameworks)."""
# Some frameworks may not support 100, so we just check it doesn't crash
# HTTP 100 Continue is an informational response that must be followed
# by a final response. Using it as a final response is invalid.
response = await http_client.get("/status/100")
# 100 is special - some servers transform it
assert response.status_code in (100, 200)