You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A POST request with a `Range` header. The Range mechanism only applies to GET requests.
19
+
20
+
```http
21
+
POST / HTTP/1.1\r\n
22
+
Host: localhost:8080\r\n
23
+
Content-Length: 5\r\n
24
+
Range: bytes=0-10\r\n
25
+
\r\n
26
+
hello
27
+
```
28
+
29
+
## What the RFC says
30
+
31
+
> "A server MUST ignore a Range header field received with a request method that is unrecognized or for which range handling is not defined." — RFC 9110 §14.2
32
+
33
+
Range handling is only defined for GET (RFC 9110 §14.2). For all other methods, the server must ignore the Range header and process the request normally.
34
+
35
+
## Why it matters
36
+
37
+
If a server incorrectly applies Range semantics to a POST request (returning `206 Partial Content`), it could truncate the request body or cause unexpected behavior. The server should process the full POST body and return a normal `2xx` response.
38
+
39
+
## Verdicts
40
+
41
+
-**Pass** — Server returns `2xx` (correctly ignored Range for POST)
42
+
-**Fail** — Server returns `206` (incorrectly applied Range to POST) or any non-2xx response
An HTTP/1.0 request with WebSocket upgrade headers. The server must ignore the Upgrade field because it was received in an HTTP/1.0 request.
19
+
20
+
```http
21
+
GET / HTTP/1.0\r\n
22
+
Host: localhost:8080\r\n
23
+
Connection: Upgrade\r\n
24
+
Upgrade: websocket\r\n
25
+
Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==\r\n
26
+
Sec-WebSocket-Version: 13\r\n
27
+
\r\n
28
+
```
29
+
30
+
## What the RFC says
31
+
32
+
> "A server that receives an Upgrade header field in an HTTP/1.0 request MUST ignore that Upgrade field." — RFC 9110 §7.8
33
+
34
+
The Upgrade mechanism is an HTTP/1.1 feature. An HTTP/1.0 client cannot participate in protocol switching, so the server must not attempt it.
35
+
36
+
## Why it matters
37
+
38
+
If a server processes an Upgrade from an HTTP/1.0 client and returns `101 Switching Protocols`, the client likely cannot handle the protocol switch. This could lead to connection corruption or security issues, especially if a proxy is involved that speaks HTTP/1.0 to the backend.
39
+
40
+
## Verdicts
41
+
42
+
-**Pass** — Server returns any status other than `101` (correctly ignored Upgrade)
43
+
-**Fail** — Server returns `101 Switching Protocols` (incorrectly upgraded an HTTP/1.0 request)
0 commit comments