mirror of
https://github.com/frappe/gunicorn.git
synced 2026-07-07 13:11:30 +08:00
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:
parent
9c2bedceb7
commit
746cc049d0
@ -73,11 +73,12 @@ class TestHttpResponseStatus:
|
|||||||
response = await http_client.get(f"/status/{code}")
|
response = await http_client.get(f"/status/{code}")
|
||||||
assert response.status_code == 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):
|
async def test_status_100_continue(self, http_client):
|
||||||
"""Handle 100 status (may not be supported by all frameworks)."""
|
"""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")
|
response = await http_client.get("/status/100")
|
||||||
# 100 is special - some servers transform it
|
|
||||||
assert response.status_code in (100, 200)
|
assert response.status_code in (100, 200)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user