RE: How to write a Valve that can inspect the HTTP Body, without damaging the InputStream?

2004-08-23 Thread Betts, Chris
: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Mon 8/23/2004 11:07 PM To: Tomcat Users List Cc: Subject:Re: How to write a Valve that can inspect the HTTP Body, without damaging the InputStream? Can't you use a java.io.PushbackInputStream? You could write a Filter instead

Re: How to write a Valve that can inspect the HTTP Body, without damaging the InputStream?

2004-08-23 Thread Jon Wingfield
Can't you use a java.io.PushbackInputStream? You could write a Filter instead of a Valve. In the Filter wrap the ServletRequest and provide a custom ServletInputStream which uses the PushbackInputStream around the real ServletInputStream. Once security checks have passed you can push back the use

How to write a Valve that can inspect the HTTP Body, without damaging the InputStream?

2004-08-23 Thread Betts, Chris
Hi Folks, I want to write a tomcat security Valve that does content checking of the HTTP body, before anything else happens (e.g. 3rd party destination servlets I have no control over are called). However, to read the body data I 'use up' the inputStream, and can't find any way to put i

How to write a Valve that can inspect the HTTP Body, without damaging the InputStream?

2004-08-23 Thread Betts, Chris
Hi Folks, I want to write a tomcat security Valve that does content checking of the HTTP body, before anything else happens (e.g. 3rd party destination servlets I have no control over are called). However, to read the body data I 'use up' the inputStream, and can't find any way to put