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

<!doctype html><html lang="en"><head><title>HTTP Status 400 – Bad
Request</title><style type="text/css">body
{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;}</style></head><body><h1>HTTP
Status 400 – Bad Request</h1><hr class="line" /><p><b>Type</b>
Exception Report</p><p><b>Message</b> Invalid character found in the
HTTP protocol [HTTP&#47;1.1...]</p><p><b>Description</b> 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).</p><p><b>Exception</b></p><pre>java.lang.IllegalArgumentException:
Invalid character found in the HTTP protocol [HTTP&#47;1.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)
</pre><p><b>Note</b> The full stack trace of the root cause is
available in the server logs.</p><hr class="line" /><h3>Apache
Tomcat/9.0.41</h3></body></html>


-- 
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

Reply via email to