I just tried the following command to test if tomcat does in fact listen on UDP:
aryeh@sarek1024% nc -u localhost 8080
GET / HTTP/1.1
aryeh@sarek1024%
Which is nice to see tomcat is listening but it is not apparently
processing any requests since doing the same on TCP yields:
aryeh@sarek1024% nc localhost 8080
GET / HTTP/1.1
HTTP/1.1 400
Content-Type: text/html;charset=utf-8
Content-Language: en
Content-Length: 1859
Date: Thu, 08 Dec 2022 21:51:11 GMT
Connection: close
HTTP Status 400 – Bad
Requestbody
{font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b
{color:white;background-color:#525D76;} h1 {font-size:22px;} h2
{font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a
{color:black;} .line
{height:1px;background-color:#525D76;border:none;}HTTP
Status 400 – Bad RequestType
Exception ReportMessage Invalid character found in the
HTTP protocol [HTTP1.1...]Description The server
cannot or will not process the request due to something that is
perceived to be a client error (e.g., malformed request syntax,
invalid request message framing, or deceptive request
routing).Exceptionjava.lang.IllegalArgumentException:
Invalid character found in the HTTP protocol [HTTP1.1...]
org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:559)
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:261)
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:888)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1597)
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:748)
Note The full stack trace of the root cause is
available in the server logs.Apache
Tomcat/9.0.41
--
Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org