Author: jfclere
Date: Tue Feb 10 09:40:19 2009
New Revision: 742915
URL: http://svn.apache.org/viewvc?rev=742915&view=rev
Log:
Make sure the 400 is returned to the browser. (like other connectors).
Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/jk/common/ChannelNioSocket.java
tomcat/tc6.0.x/trunk/java/org/apache/jk/common/ChannelSocket.java
tomcat/tc6.0.x/trunk/java/org/apache/jk/common/HandlerRequest.java
Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=742915&r1=742914&r2=742915&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Feb 10 09:40:19 2009
@@ -155,10 +155,6 @@
Haven't checked what the other ones will do
-1:
-* Make sure the 400 is returned to the browser. (like other connectors).
- http://people.apache.org/~jfclere/patches/patch400.1.txt
- +1: jfclere, fhanik, remm
-
* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=38570
When checking docBase against appBase, make sure we check for an exact match
against the appBase
Modified: tomcat/tc6.0.x/trunk/java/org/apache/jk/common/ChannelNioSocket.java
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jk/common/ChannelNioSocket.java?rev=742915&r1=742914&r2=742915&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/jk/common/ChannelNioSocket.java
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jk/common/ChannelNioSocket.java Tue
Feb 10 09:40:19 2009
@@ -56,6 +56,7 @@
import org.apache.coyote.Request;
import org.apache.coyote.RequestGroupInfo;
import org.apache.coyote.RequestInfo;
+import org.apache.coyote.ActionCode;
import org.apache.tomcat.util.threads.ThreadPool;
import org.apache.tomcat.util.threads.ThreadPoolRunnable;
@@ -854,6 +855,7 @@
status= invoke( recv, ep );
if( status != JkHandler.OK ) {
log.warn("processCallbacks status " + status );
+ ep.action(ActionCode.ACTION_CLOSE,
ep.getRequest().getResponse());
return false;
}
synchronized(this) {
Modified: tomcat/tc6.0.x/trunk/java/org/apache/jk/common/ChannelSocket.java
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jk/common/ChannelSocket.java?rev=742915&r1=742914&r2=742915&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/jk/common/ChannelSocket.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jk/common/ChannelSocket.java Tue Feb
10 09:40:19 2009
@@ -45,6 +45,7 @@
import org.apache.coyote.Request;
import org.apache.coyote.RequestGroupInfo;
import org.apache.coyote.RequestInfo;
+import org.apache.coyote.ActionCode;
import org.apache.tomcat.util.modeler.Registry;
import org.apache.tomcat.util.threads.ThreadPool;
import org.apache.tomcat.util.threads.ThreadPoolRunnable;
@@ -697,6 +698,7 @@
status= this.invoke( recv, ep );
if( status!= JkHandler.OK ) {
log.warn("processCallbacks status " + status );
+ ep.action(ActionCode.ACTION_CLOSE,
ep.getRequest().getResponse());
break;
}
}
Modified: tomcat/tc6.0.x/trunk/java/org/apache/jk/common/HandlerRequest.java
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jk/common/HandlerRequest.java?rev=742915&r1=742914&r2=742915&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/jk/common/HandlerRequest.java
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jk/common/HandlerRequest.java Tue Feb
10 09:40:19 2009
@@ -265,8 +265,16 @@
((Request)ep.getRequest()).unparsedURI());
}
} catch( Exception ex ) {
+ /* If we are here it is because we have a bad header or
something like that */
log.error( "Error decoding request ", ex );
msg.dump( "Incomming message");
+ Response res=ep.getRequest().getResponse();
+ if ( res==null ) {
+ res=new Response();
+ ep.getRequest().setResponse(res);
+ }
+ res.setMessage("Bad Request");
+ res.setStatus(400);
return ERROR;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]