Bugzilla 41675: add a couple of DEBUG-level logging statements to Http11Processor...
authoryoavs <yoavs@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 25 Mar 2007 23:08:01 +0000 (23:08 +0000)
committeryoavs <yoavs@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 25 Mar 2007 23:08:01 +0000 (23:08 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@522379 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/http11/Http11Processor.java
webapps/docs/changelog.xml

index d5dfbb1..b886c48 100644 (file)
@@ -1174,6 +1174,10 @@ public class Http11Processor implements ActionHook {
             http11 = false;
             error = true;
             // Send 505; Unsupported HTTP version
+            if (log.isDebugEnabled()) {
+                log.debug(sm.getString("http11processor.request.prepare")+
+                          " Unsupported HTTP version \""+protocolMB+"\"");
+            }
             response.setStatus(505);
         }
 
@@ -1282,6 +1286,10 @@ public class Http11Processor implements ActionHook {
                 // Unsupported transfer encoding
                 error = true;
                 // 501 - Unimplemented
+                if (log.isDebugEnabled()) {
+                    log.debug(sm.getString("http11processor.request.prepare")+
+                              " Unsupported transfer encoding \""+encodingName+"\"");
+                }
                 response.setStatus(501);
             }
         }
@@ -1300,6 +1308,10 @@ public class Http11Processor implements ActionHook {
         if (http11 && (valueMB == null)) {
             error = true;
             // 400 - Bad request
+            if (log.isDebugEnabled()) {
+                log.debug(sm.getString("http11processor.request.prepare")+
+                          " host header missing");
+            }
             response.setStatus(400);
         }
 
index 0815b8a..db5c8ff 100644 (file)
       <fix>
         Requests with multiple content-length headers are now rejected. (markt)
       </fix>
+      <add>
+        <bug>41675</bug> Add a couple of DEBUG-level logging statements to Http11Processors
+          when sending error responses.  Patch by Ralf Hauser. (yoavs)
+      </add>
     </changelog>
   </subsection>
   <subsection name="Webapps">