You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by pa...@accenture.com on 2003/07/17 10:04:11 UTC

Handling HTTP 1.1 status 100 responses

Hi,

I am looking for a way to handle http1.1 status 1XX responses, without
having to post my request again (note that I never put explicit expect
headers in my requests!). I suppose that some implementations bases on the
Jakarta-commons http client have done this already. Can anybody suggest me
how to do this?

Thanks a lot,

Patrick Baeyens


This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information.  If you have
received it in error, please notify the sender immediately and delete the
original.  Any other use of the email by you is prohibited.


Re: Handling HTTP 1.1 status 100 responses

Posted by Roland Weber <RO...@de.ibm.com>.
Hello Patrick,

I just had a look into the source code of HttpMethodBase.
The HTTP client deals with 100-continue responses, but
seemingly only when an "Expect:" header has been sent
in the first place. So you might want to add that header.

You can also check for some intermediate proxies that
add an "Expect:" header and do not filter the 100-continue
responses.

But this might be an issue for the HTTP client.
RFC 2616 says in chapter 10.1:

A client MUST be prepared to accept one or more 1xx status
responses prior to a regular response, even if the client does
not expect a 100 (Continue) status message. Unexpected 1xx
status responses MAY be ignored by a user agent.


regards,
  Roland

Re: Handling HTTP 1.1 status 100 responses

Posted by Roland Weber <RO...@de.ibm.com>.
Hello Patrick,

posting the request again after a 100-continue response wouldn't help.
You'ld only get another 100 response for the new request as well.

I don't know whether the commons client deals with 100 responses.
But you can always force it to act as an HTTP/1.0 client, and servers
aren't allowed to generate 100 resonses for HTTP/1.0 requests.
See HttpMethodBase.setHttp11(boolean).

regards,
  Roland