Thank you for pointing out my error in assuming that it was Tomcat's fault. I have forwarded the issue to the application vendor to see if they can fix. I appreciate your time in responding to my question as well as giving me additional information with which to attempt to debug and/or correct the issue (i.e. the filter option) I will consider this question closed. THanks, Jeff
On Thu, Jan 29, 2015 at 4:58 PM, Konstantin Kolinko <knst.koli...@gmail.com> wrote: > 2015-01-30 1:29 GMT+03:00 Jeff Kohut <jeff.ko...@gmail.com>: > > My first post to Tomcat list, pardon me if I make any mistakes, > > > > Any help you can provide would be greatly appreciated. > > > > I have a Tomcat Server (V 7.0.54) running under Windows 2008 R2 With > > Service Pack 1 (and up to date on Security as well as OS patches). That > > server is running a vendor supplied group of applications via .war file > as > > normal. to receive Soap/XML data from remote computer and process and > > return data back to calling application. > > > > The remote calling application hosted by IBM Websphere Application Server > > (running Axis2 jars) that is sending XML Soap data via a Post to the > Tomcat > > Web server on port 8080/8443. If the amount of data is relatively small > > (i.e. 14 K) we have no problem receiving the data as Websphere is using > > Length Http 1.1 header and Tomcat sends the data to the application with > no > > issue. However as the data gets larger, Websphere begins using Chunked > > Transfer Encoding and apparently Tomcat does not seem to like this as it > > returns Http 411 "Length Required" message. I have searched Tomcat site, > > and Tomcat indicates that is support Chunked encoding (part of the MUST > > supported parts of the HTTP 1.1 RFC standard. > > > > My connector in Tomcat is configured: > > > > <Connector port="8080" protocol="HTTP/1.1" > > connectionTimeout="20000" > > redirectPort="8443" /> > > > > I have tried forcing BIO,NIO, and APR with no luck to see if the > > implementations might handle Chunked Encoding differently. > > > > I also have a more complicated 8443 SSL port that also works, until > Chunked > > encoding is used, and then it also responds with 411 Length Required > error. > > > > I am able to replicate the problem by using SoapUI to send the same Soap > > formatted XML Data. It works fine sending all sizes of data UNTIL I > enable > > Chunked Encoding Threshold which is smaller than the XML payload size > > (threshold means to not Chunk until data is larger than Threshold), When > > Chunking starts, Tomcat responds with 411 Length required. > > > > To finally work around this issue, I have put an Apache 2.4 server in > front > > of Tomcat, and have enable the mod_proxy_http, and am using an Apache > > SetEnv variable setting of : SetEnv proxy-sendcl 1 > > The proxy-sendcl tells Apache to send the "Length" , and then Tomcat and > > application are happy with the data (i.e. no 411 method sent back). > > > > As I stated above, Tomcat indicates it supports Chunked Encoding on it's > > site, but it acts as if it is not happy with it. > > > > We have looked at packet traces and it appears that the Chunks are > > formatted correctly (we are getting an initial Chunk(s) and then the last > > Chunk is zero with Cr Lf following it as it seems to indicate in RFC. > > > > Has anyone else seen this issue and is there any way to alter the Tomcat > > behavior with Chunked encoded data? > > > > We found an IBM Websphere article that seems to admit to the problem, but > > they indicate that they should not have to offer a method to disable > > chunked encoding as some who seem to have encountered this problem > suggest. > > IBM states that since Http 1.1 mandates support of Chunked Encoding, then > > HTTP 1.1. servers should support Chunked encoding correctly. FYI, I took > > the time to recreate the problem in C# code, and as soon as I turn on > > Chunked Encoding, the 411 errors is present from that application also > when > > sending data to Tomcat Server. > > > Tomcat 7 does not send status code 411 (a constant is declared in > HttpServletResponse class but it is never used). That response code is > coming from a web application that you are using. > > You may try debugging. > http://wiki.apache.org/tomcat/FAQ/Developing#Debugging > with a breakpoint on sendError(int,String), setStatus(int) methods of > org.apache.catalina.connector.Response. > > It should be possible to implement a javax.servlet.Filter to cache a > request and feed it to the web application for further processing, but > it would be better to fix the web application itself. > > Best regards, > Konstantin Kolinko > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >