I have an issue with Apache2 which I use as a proxy. My software sends HTTP PUT for protected resource with

Expect: 100-continue

Transfer-Encoding: chunked

And instead of getting '401 Unauthorized' I get '100 Continue'. After that my soft sends all chunks to server and then I get 401.

It looks like Apache does not forward headers and automatically sends '100 Continue'.

Is this correct behavior?

Here is what I found here

If a proxy receives a request that includes an Expect request-
    header field with the "100-continue" expectation, and the proxy
    either knows that the next-hop server complies with HTTP/1.1 or
    higher, or does not know the HTTP version of the next-hop
    server, it MUST forward the request, including the Expect header

1 Answer 1


This question was asked already on stackoverflow.com ( https://stackoverflow.com/questions/3889574/apache-and-mod-proxy-not-handling-http-100-continue-from-client-http-417 ):

You could configure it this way:

<IfModule mod_headers.c>
  RequestHeader unset Expect early

This will remove the Expect header, and the communication should work.

EDIT Please make sure, that the remote side is HTTP/1.1. In the same RFC you linked there is just one page after your cite this:

  - If the proxy knows that the version of the next-hop server is
    HTTP/1.0 or lower, it MUST NOT forward the request, and it MUST
    respond with a 417 (Expectation Failed) status.
  • No. This is different issue. I don't want to remove this header. If I do so I get 413 error.
    – Kylo
    Aug 18, 2011 at 14:19
  • @Kylo In the Topic, there are also mentioned two bugs, that prevent Apache to handle the header correctly. Thats the same issue Aug 18, 2011 at 14:55
  • Next hop is HTTP/1.1 for sure. So I assume it is Apache bug. Right?
    – Kylo
    Aug 19, 2011 at 6:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.