Re: servlet filter buffer question




"Steve" <steve@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:VTWig.23992$%m5.17368@xxxxxxxxxxxx

An update -- it seems like dynamically padding isn't possible -- I don't
see any way to read the size of the written content. But, If I pad the
end of the page with 8192-plus spaces, it "works". So it seems to be
ignoring my buffer size request in the JSP and doing it in 8kb chunks. If
I force the last real content to fill a chunk, that gets written, and the
content gets cut off somewhere in the middle of my padding.

The content-length header isn't always correct because it's sent before the
actual content is sent.. I'm thinking that Tomcat 4.x did the right thing
and looked at the actual size of the content, whereas 5.5 is looking at the
declared buffer size or the content header
BTW, I'm not sure if I understand your question "What function does the
filter chain do here?" If you mean what is the application, I'm sending a
dynamic page and saving a copy of what was sent.

I was just wondering if the filter chain could be interfering with the read
/ write operation--I'm unfamiliar with them. I can't think of anything else
and I'm too unfamiliar with the nuances of Tomcat.

Good luck,
Matt Humphrey matth@xxxxxxxxxxxxxx http://www.iviz.com/


.



Relevant Pages

  • [Full-disclosure] [CVE-2007-1358] Apache Tomcat XSS vulnerability in Accept-Language
    ... Tomcat 4.1.0 to 4.1.34 ... Web pages that display the Accept-Language header value sent by the ... client are susceptible to a cross-site scripting attack if they assume ...
    (Full-Disclosure)
  • [CVE-2007-1358] Apache Tomcat XSS vulnerability in Accept-Language header processing
    ... Tomcat 4.1.0 to 4.1.34 ... Web pages that display the Accept-Language header value sent by the ... client are susceptible to a cross-site scripting attack if they assume ...
    (Bugtraq)
  • Re: Unsupported major.minor version 49.0
    ... The subject header should be used to ... need to use a 1.5 JVM to run your program. ... I think I need to define <Context> elements for my webapps, I've been reading about this in the Tomcat Docs, and even though I have tried to do what it says here I get SEVERE errors when Tomcat is starting up (I mean if I define a element in either conf/Catalina/localhost/admin.xml, balancer.xml, or manager.xml (does it make a diff. ...
    (comp.lang.java.help)
  • Re: Adding common header to all JSP pages
    ... > header and footer frames. ... > filter for text/html content, that filter would prepend header and append ... > So how can I set up such a filter in tomcat 3.2? ...
    (comp.lang.java.programmer)
  • Re: Adding common header to all JSP pages
    ... > header and footer frames. ... > filter for text/html content, that filter would prepend header and append ... > So how can I set up such a filter in tomcat 3.2? ...
    (comp.lang.java.help)