Bug 41675

Summary: Add a debug statement when some necessary header information is missing
Product: Tomcat 5 Reporter: C <cedster>
Component: Connector:CoyoteAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: enhancement CC: hauser
Priority: P2    
Version: 5.5.20   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: Http11Processor.patch

Description C 2007-02-22 00:36:16 UTC
Reference: org.apache.coyote.http11.Http11Processor.java

It would be helpful for developers to get informed when some required header
information is missing. eg when headers.getValue("host"); returns null and
http11 is true.

Couldn't you add a log.debug statement that informs the user about missing
header-fields? (For example in Http11Processor.java:1391)
Comment 1 Ralf Hauser 2007-02-25 02:33:54 UTC
Cedric means org.apache.coyote.http11.Http11Processor.prepareRequest() where in
the request the headers "HTTP/1.1" or "Host" are enforced, but only response
code 505 or 400 and 501 are sent, but no (valuable) background is written to any
log at any debug level (Unsupported transfer encoding, "Host" header missing, etc.)
Comment 2 Ralf Hauser 2007-02-26 01:22:52 UTC
Created attachment 19634 [details]
Http11Processor.patch
Comment 3 Yoav Shapira 2007-03-25 16:08:27 UTC
Good suggestion, thanks for sending in a patch.  I've applied it on the Tomcat
5.5 and 6.0 trunks.