Bug 41675 - Add a debug statement when some necessary header information is missing
Summary: Add a debug statement when some necessary header information is missing
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Connector:Coyote (show other bugs)
Version: 5.5.20
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-22 00:36 UTC by C
Modified: 2007-03-25 16:08 UTC (History)
1 user (show)



Attachments
Http11Processor.patch (1.34 KB, patch)
2007-02-26 01:22 UTC, Ralf Hauser
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.