2

Currently we have an Apache 2.2.3 server with mod_ssl 2.2.3 running Django, with users authenticating by using a x509 certificate.

So far the system is running perfectly except for a single user, who when trying to upload a file receives 400 Bad Request error, and the contents of the ssl_error_log regarding this operation are:

[<date>] [error] [client <client ip>] request failed: error reading the headers, referer: <referrer url>

The contents of the ssl_access_log are:

<client ip> - - [<date>] "POST <target page> HTTP/1.1" 400 321

Also, the user's browser is Firefox as far as I know.

I am completely unable to reproduce this bug and so far none of the other users have experienced it. Could you point out some reasons for this to happen?

Semant
  • 21
  • 1
  • 3

1 Answers1

1

I've experienced connectivity that stops the upstream after an X amount of bytes is sent. X was a pretty low value, as in enough to request some simple pages, but not to deal with ajax requests much less upload files. As far as I recall, this connectivity problem occurred only when tethering (from a specific Android phone, but I didnt even test other phones).

So if the upstream gets interrupted and the upload stalls, it makes sense apache would return this error, according to this post: "Apache waits a time equal to the Timeout directive (defaults to 5 minutes if not defined) for a response from the client. It is likely Apache is waiting for the CRLF that indicates the end of the headers, yet it is never received.."

Gaia
  • 2,872
  • 1
  • 41
  • 59
  • Thanks for the explanation , any solution to resolve this ? – prem Feb 05 '16 at 10:40
  • 1
    You would have to fix the client. Apache is just doing it's job. In most scenarios fixing the client in impractical, but if you have control over the clients just upgrade their browser to a later version. – Gaia Feb 05 '16 at 16:28