hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <http-as...@dubioso.net>
Subject Re: Problem with POST using proxy
Date Mon, 18 Dec 2006 21:55:54 GMT
Hello Alex,

> From the debug statements, it seems to me
> that httpclient is sending all the headers first, then getting a
> response including the proxy response.  Then it sends the actual POST
> parameters, but appears to not send the headers again.  This request
> times out, but using the browser works fine.

this is called the expect-continue handshake. The request line and
headers are sent, and one of the headers is "Expect: 100-continue".
The client then waits for an _intermediate_ response with status
code 100 before sending the request body. There is nothing wrong here,
except that the server isn't responding.

I doubt that your browser just sends that request. I would expect
that the browsers starts by sending a request for the page that
holds the web form, submitting it only afterwards once you've
entered something. If you're only sending the POST using HttpClient,
the server may behave differently because the request is not part
of an established session.

Our Client HTTP Programming Primer describes in great detail
how to simulate browser behaviour when submitting an HTML form.
It also suggests things to try if you run into problems:
http://wiki.apache.org/jakarta-httpclient/ForAbsoluteBeginners

hope that helps,
  Roland


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message