This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new bdc99c8726 HTTP/0.9 only allows GET
bdc99c8726 is described below
commit bdc99c8726c497d5a9ad3f7c982e67feaa7f12e7
Author: remm <[email protected]>
AuthorDate: Thu Nov 27 09:57:04 2025 +0100
HTTP/0.9 only allows GET
No test as my plan is to remove HTTP/0.9 support.
---
java/org/apache/coyote/http11/Http11Processor.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/java/org/apache/coyote/http11/Http11Processor.java
b/java/org/apache/coyote/http11/Http11Processor.java
index b6c9c5239c..19a6bbdcc0 100644
--- a/java/org/apache/coyote/http11/Http11Processor.java
+++ b/java/org/apache/coyote/http11/Http11Processor.java
@@ -607,6 +607,11 @@ public class Http11Processor extends AbstractProcessor {
http09 = true;
http11 = false;
keepAlive = false;
+ if (!Method.GET.equals(request.getMethod())) {
+ // Send 400, GET is the only allowed method for HTTP/0.9
+ response.setStatus(400);
+ setErrorState(ErrorState.CLOSE_CLEAN, null);
+ }
} else {
// Unsupported protocol
http09 = false;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]