You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Don Robertson <do...@documentum.com> on 2003/05/01 00:55:30 UTC
Handling 100 Continue on https put or post?
I have a simple PUT (or POST) of a file to Tomcat 4.1. Without SSL I get a
reliable 200 return status. Using https though, Tomcat appears to return a
continue, and this gets passed back to my client program. The whole request
body has been passed successfully to Tomcat (I can verify this), but what am
I supposed to do in the client to wait for a proper completion? I assumed
that if httpclient were automatically handling the continue then it would
return a 200, but maybe I am misunderstanding the HTTP interaction.
I have reduced this to a trivial code fragment...
HttpClient client = new HttpClient();
PutMethod put = new PutMethod( "https://localhost:8443" );
put.setRequestBody( new FileInputStream( "foo.zip" ) );
put.setPath( "/myServlet/foo.zip" );
client.executeMethod( put );
System.out.println( put.getStatusLine() );
On the client I am using the SunJSSE provider.
Any ideas?
Thanks
Don
Re: Handling 100 Continue on https put or post?
Posted by Adrian Sutton <ad...@intencha.com>.
Hi Don,
It sounds like you're using 2.0-alpha 3 which exhibited problems just
like this. We've done a lot of work on PUT and POST recently so
upgrading to the latest nightly build should fix the problem. We are
expecting to release 2.0-beta1 very soon.
If that doesn't fix the problem, could you please send through a wire
trace showing the problem, instructions can be found at
http://jakarta.apache.org/commons/httpclient/logging.html
Regards,
Adrian Sutton.
On Thursday, May 1, 2003, at 08:55 AM, Don Robertson wrote:
> I have a simple PUT (or POST) of a file to Tomcat 4.1. Without SSL I
> get a
> reliable 200 return status. Using https though, Tomcat appears to
> return a
> continue, and this gets passed back to my client program. The whole
> request
> body has been passed successfully to Tomcat (I can verify this), but
> what am
> I supposed to do in the client to wait for a proper completion? I
> assumed
> that if httpclient were automatically handling the continue then it
> would
> return a 200, but maybe I am misunderstanding the HTTP interaction.
>
> I have reduced this to a trivial code fragment...
>
> HttpClient client = new HttpClient();
> PutMethod put = new PutMethod( "https://localhost:8443" );
> put.setRequestBody( new FileInputStream( "foo.zip" ) );
> put.setPath( "/myServlet/foo.zip" );
> client.executeMethod( put );
> System.out.println( put.getStatusLine() );
>
> On the client I am using the SunJSSE provider.
>
> Any ideas?
>
> Thanks
> Don