You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ch...@crazyfool.org on 2011/03/11 16:22:09 UTC
Chunked encoding extensions
Hi folks
I am looking information on how to extend the tomcat chunked encoding
functionality.
>From looking at the code I have found ChunkedInputFilter.java and
ChunkedOutputFilter.java, these appear to be the filters responsible.
From what I can see they are invoked depending on whether the response/
request has a content Length set, if no length then we add the chunked
filter.
Now this is all fantastic so far, what I would like to do is extend
the code so that it implements the chunk encoding extensions as
mentioned in the rfc2616.
The reason being is that occassionally I would like my application
layer to be able to specify a chunk extension within the chunk header
thats about to be written, this will allow me to communicate some
extra information to the http endpoint with which i am communicating
with, per chunk.This will be link to link, and wont involve any SW in between the 2 links.
What do you think is the best solution here, should i directly update
the current Chunked filters ? If so how can I pass information down
from my application to them ?
My application is a servlet which accepts http posts, thus I have access to the response object, which I believe the chunked filters can also access. Maybe we can add an interface here, and use it to communicate. Im using tomcat 6.0.29.
Maybe there is a way to do this without altering the current code,
some how disabling the chunked filters and adding my own filters in to
the chain?
Comments appreciated, im new to tomcat and java, so go easy ;p
Thanks
Chris