On 10/08/2015 21:05, wadzapi wrote: > Hello! I'm WadZapi - JEE developer from Russia.
You'll notice you haven't received a response in almost 24 hours. I'll note that cross-posting user questions to the dev list is more likely to annoy the people who can answer your question that it is likely to get you a speedy response. Creating a Bugzilla issue for a user question when you don't get a response is also not going to help. > We're using Tomcat 7.0.61 as servlet container in production > environment. I tried to configure servlet 3.0 multipart config > annotations with Failed Request Filter. > I've stuck and struggling :-) trying to configure it well with myFaces > JSF implementation. I found that root cause of that troubles in > maxSwallowSize attribute and handling it in IdentityInputFilter. > With configured maxSwallowSize=-1 FailedRequestFilter works well - HTTP > 400 sent and client redirected to error page. OK. > But using default maxSwallowSize attribute (2mb) or any other used for > connector - (with filesize > 2 MB) client doesn't get any answer, As expected. > may be server send after connection was reset and socket was closed. Nope. The server isn't going to bother trying to send a response in this case. > Connection was closed, because IdentityInputFilter threw IOException - > after that socket was immediately closed. So on client it looks like > CONNECTION_RESET and blank page (request was sent, but no answer received). It looks like that because that is exactly what has happened. > May be I've lost something in my configuration. Configuration looks fine to me. You are seeing the expected behaviour for each of the configurations you describe. > I've read mailing list and saw some pathes of your on > FailedRequestFilter for maxUploadSize attributes in request. May be you > could give me some advices for searching a good way of Handling > maxFileUpload size exception handling. > It could be fixed by setting maxSwallowSize=-1, but it looks like a > strange hack. It couldn't go to production config as well, because > behaviour with handling -1 could be changed in IdentityInputFilter. > May be there any other ways of configuring and handling upload size > exceeded limit in multipartconfigelement. I'll be cheking email, looking > forward your replies and will be truly grateful for any advices. Remember that most HTTP clients don't bother to read the response until they have sent the request in full. Also recall that network buffers are finite. With the above in mind, decide what behaviour you want and then configure Tomcat accordingly. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org