]>
Commit | Line | Data |
---|---|---|
32e14b4a | 1 | Index: connectors/jk/java/org/apache/jk/common/ChannelSocket.java |
2 | =================================================================== | |
3 | --- connectors/jk/java/org/apache/jk/common/ChannelSocket.java (wersja 781361) | |
4 | +++ connectors/jk/java/org/apache/jk/common/ChannelSocket.java (wersja 781362) | |
5 | @@ -46,6 +46,7 @@ | |
6 | import org.apache.coyote.Request; | |
7 | import org.apache.coyote.RequestGroupInfo; | |
8 | import org.apache.coyote.RequestInfo; | |
9 | +import org.apache.coyote.ActionCode; | |
10 | import org.apache.tomcat.util.threads.ThreadPool; | |
11 | import org.apache.tomcat.util.threads.ThreadPoolRunnable; | |
12 | ||
13 | @@ -703,6 +704,7 @@ | |
14 | status= this.invoke( recv, ep ); | |
15 | if( status!= JkHandler.OK ) { | |
16 | log.warn("processCallbacks status " + status ); | |
17 | + ep.action(ActionCode.ACTION_CLOSE, ep.getRequest().getResponse()); | |
18 | break; | |
19 | } | |
20 | } | |
21 | Index: connectors/jk/java/org/apache/jk/common/HandlerRequest.java | |
22 | =================================================================== | |
23 | --- connectors/jk/java/org/apache/jk/common/HandlerRequest.java (wersja 781361) | |
24 | +++ connectors/jk/java/org/apache/jk/common/HandlerRequest.java (wersja 781362) | |
25 | @@ -265,8 +265,16 @@ | |
26 | ((Request)ep.getRequest()).unparsedURI()); | |
27 | } | |
28 | } catch( Exception ex ) { | |
29 | + /* If we are here it is because we have a bad header or something like that */ | |
30 | log.error( "Error decoding request ", ex ); | |
31 | msg.dump( "Incomming message"); | |
32 | + Response res=ep.getRequest().getResponse(); | |
33 | + if ( res==null ) { | |
34 | + res=new Response(); | |
35 | + ep.getRequest().setResponse(res); | |
36 | + } | |
37 | + res.setMessage("Bad Request"); | |
38 | + res.setStatus(400); | |
39 | return ERROR; | |
40 | } | |
41 | ||
42 | Index: connectors/jk/java/org/apache/jk/common/ChannelNioSocket.java | |
43 | =================================================================== | |
44 | --- connectors/jk/java/org/apache/jk/common/ChannelNioSocket.java (wersja 781361) | |
45 | +++ connectors/jk/java/org/apache/jk/common/ChannelNioSocket.java (wersja 781362) | |
46 | @@ -56,6 +56,7 @@ | |
47 | import org.apache.coyote.Request; | |
48 | import org.apache.coyote.RequestGroupInfo; | |
49 | import org.apache.coyote.RequestInfo; | |
50 | +import org.apache.coyote.ActionCode; | |
51 | import org.apache.tomcat.util.threads.ThreadPool; | |
52 | import org.apache.tomcat.util.threads.ThreadPoolRunnable; | |
53 | ||
54 | @@ -854,6 +855,7 @@ | |
55 | status= invoke( recv, ep ); | |
56 | if( status != JkHandler.OK ) { | |
57 | log.warn("processCallbacks status " + status ); | |
58 | + ep.action(ActionCode.ACTION_CLOSE, ep.getRequest().getResponse()); | |
59 | return false; | |
60 | } | |
61 | synchronized(this) { |