tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1137450 - /tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
Date Sun, 19 Jun 2011 21:27:38 GMT
Author: markt
Date: Sun Jun 19 21:27:38 2011
New Revision: 1137450

URL: http://svn.apache.org/viewvc?rev=1137450&view=rev
Log:
Align with BIO (add debug log messages)
Prepare for pulling up (add tests around adverts for comet support)

Modified:
    tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java?rev=1137450&r1=1137449&r2=1137450&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java Sun Jun 19 21:27:38
2011
@@ -702,6 +702,10 @@ public class Http11NioProcessor extends 
             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);
             adapter.log(request, response, 0);
         }
@@ -810,6 +814,10 @@ public class Http11NioProcessor extends 
                 // Unsupported transfer encoding
                 error = true;
                 // 501 - Unimplemented
+                if (log.isDebugEnabled()) {
+                    log.debug(sm.getString("http11processor.request.prepare")+
+                              " Unsupported transfer encoding \""+encodingName+"\"");
+                }
                 response.setStatus(501);
                 adapter.log(request, response, 0);
             }
@@ -829,6 +837,10 @@ public class Http11NioProcessor extends 
         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);
             adapter.log(request, response, 0);
         }
@@ -845,13 +857,21 @@ public class Http11NioProcessor extends 
         }
 
         // Advertise sendfile support through a request attribute
-        if (endpoint.getUseSendfile()) 
-            request.setAttribute("org.apache.tomcat.sendfile.support", Boolean.TRUE);
+        if (endpoint.getUseSendfile()) {
+            request.setAttribute("org.apache.tomcat.sendfile.support",
+                    Boolean.TRUE);
+        }
+        
         // Advertise comet support through a request attribute
-        request.setAttribute("org.apache.tomcat.comet.support", Boolean.TRUE);
+        if (endpoint.getUseComet()) {
+            request.setAttribute("org.apache.tomcat.comet.support",
+                    Boolean.TRUE);
+        }
         // Advertise comet timeout support
-        request.setAttribute("org.apache.tomcat.comet.timeout.support", Boolean.TRUE);
-
+        if (endpoint.getUseCometTimeout()) {
+            request.setAttribute("org.apache.tomcat.comet.timeout.support",
+                    Boolean.TRUE);
+        }
     }
 
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message