Re: Allow Servlet to Control "100-continue" response

2011-06-19 Thread Pid
On 19/06/2011 11:59, Rehtron wrote: > I will investigate the Tomcat Valve mechanism, but one thing is for sure, > the Valve based implementation depend on the Tomcat private implementation, > that means I cannot use Jetty to do unit test. Why not test with Tomcat instead? > Can Servlet 3.0 Comet

Re: Allow Servlet to Control "100-continue" response

2011-06-19 Thread Rehtron
Thanks to all who reply. Yes, I am developing a REST interface for a large file storage system by Servlet & Tomcat. The Expect 100-continue is highly inefficient for LARGE file transfer, I need to validate HTTP header by our access control logic when PUT a file, if the headers is invalid, the tra

Re: Allow Servlet to Control "100-continue" response

2011-06-19 Thread Simon Olofsson
On 2011-06-18 13:46, Mark Thomas wrote: > You can use a Filter as mack Lu suggested Wrong. Thanks for the correction. In StandardWrapperValve the request is acknowledged before the FilterChain is constructed. I should've looked it up :) Simon -

Re: Allow Servlet to Control "100-continue" response

2011-06-19 Thread Pid
On 18/06/2011 06:53, Rehtron wrote: > Hi > > Currently if a client supplies the "Expect: 100-continue" header on a POST > or PUT, Tomcat appears to send the response header ("100-continue") before > passing control to the servlet. Out of interest, are you asking to control specifically the 100 re

Re: Allow Servlet to Control "100-continue" response

2011-06-18 Thread Mark Thomas
On 18/06/2011 11:56, Simon Olofsson wrote: > Rehtron, > > On 2011-06-18 7:53, Rehtron wrote: >> I need to use the servlet to control this response and accept/reject the >> request before receiving the request content, Is there anyone could >> give me >> some advice? > > as you noticed it's too l

Re: Allow Servlet to Control "100-continue" response

2011-06-18 Thread Simon Olofsson
Rehtron, On 2011-06-18 7:53, Rehtron wrote: I need to use the servlet to control this response and accept/reject the request before receiving the request content, Is there anyone could give me some advice? as you noticed it's too late when your Servlet is invoked: The request is already ackn

Re: Allow Servlet to Control "100-continue" response

2011-06-18 Thread 国清 mack Lu
Try to use the filter. 2011-06-18 mack Lu 发件人: Rehtron 发送时间: 2011-06-18 13:53:58 收件人: users 抄送: 主题: Allow Servlet to Control "100-continue" response Hi Currently if a client supplies the "Expect: 100-continue" header on a POST or PUT, Tomcat appears to send

Allow Servlet to Control "100-continue" response

2011-06-17 Thread Rehtron
Hi Currently if a client supplies the "Expect: 100-continue" header on a POST or PUT, Tomcat appears to send the response header ("100-continue") before passing control to the servlet. I need to use the servlet to control this response and accept/reject the request before receiving the request c