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