Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

Detecting terminal HTTP chunk

Peter Kennard

2007-03-04



Hmm - when reading HTTP1.1 chunked data, is there a way of detecting
reciept of the terminal "0" chunk in a servlet ?

Googling about, Apparently this does not report an EOD "exception"
(as I would expect) because some people have been using post last
chunk data for server internal out-of band information. (?????)

Questions:

1 - Is there a way I can detect receipt of the terminal HTTP chunk before
  the final "read()" which would hang and timeout otherwise (Yes I
could detect an end tag or whatever and push the "problem" upstairs,
but that's not the point).

2 - Is there a way (short of writing a protocol handler) to disable
  chunk parsing in the ServletInputStream and be responsible for
my own chunk parsing ? (Ideally for me, I could access an almost raw
socket read, but, I think access to that has been abstracted away)

Thanks!
PK



---------------------------------------------------------------------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.