Solved.  You gave me a clue that helped solve it, though Tomcat could handle 
this better (not put '0 POST' in for the method name in the first place).  

Sun's implementation of HttpURLConnector apparently creates a new 
ChunkedOutputStream every time you call .getOutputStream().  In other words, 
multiple calls to conn.getOutputStream().close(); cause corrupted output.  
Calling .close() on the same output stream does not cause corrupted output.  
            
So if I call conn.getOutputStream().close(); 10 times, I get a very interesting 
method name.  I looked at the source for this, and it was not apparent that 
they meant to do this.  However, with this code, my method name becomes:

0

0

0

0

0

0

0

0

0

POST


So this is a case of the client emitting bad HTTP, and me not reading the 
socket dump correctly.

Thanks for your help!


-----Original Message-----
From: Jason Smith [mailto:jsm...@infotrustgroup.com] 
Sent: Monday, April 06, 2009 1:47 PM
To: Tomcat Users List
Subject: RE: Help with a Tomcat issue???

I'll see if I can set up a working example. And I didn't mean to say "proxy," 
not that there is one. We aren't using JK connector. :-)

-----Original Message-----
From: Jason Smith [mailto:jsm...@infotrustgroup.com] 
Sent: Monday, April 06, 2009 1:28 PM
To: Tomcat Users List
Subject: RE: Help with a Tomcat issue???

Just Tomcat, no proxy.  

And I agree, that isn't the way you'd want to fix it ultimately, but I was 
experimenting to find out what worked.  You'd ultimately like to not see the 
'0' at the beginning of the buffer.  I found the place where it was getting 
copied to the beginning of the buffer, but I can't figure out the logic behind 
the code.  Too many micro opts (it's fast!).

What did NOT work was simply subverting the copying of the data and setting the 
buffer length to 0, as is normally the case.  There are apparently some 
instances where .nextRequest must copy the data from one buffer to the next.  I 
tried.  Things didn't work so well after that...  :-)  I mentioned one of those 
in the previous email.  

But again, I am not yet familiar with this part of the Tomcat code.  So I am 
probably missing something fairly obvious.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to