« Module of the day: File::Inplace | Main | OpenID »

Lighttpd, file uploads and Safari

On one of the web applications I have, the setup is more or less like this:

In this case, lighttpd is used as a reverse HTTP proxy to Apache, using mod_proxy.

I was trying to get file uploads to work on this setup. Uploading directly to Apache works flawlessly, but via mod_proxy, Safari would hang at the end, never terminating the request.

The solution is simple: for now, just disable keep-alives. Add this to your Lighttpd virtual host configuration:

$HTTP["useragent"] =~ "^(.*MSIE.*)|(.*AppleWebKit.*)$" {
    server.max-keep-alive-requests = 0
}

Given that this is a back-office, this is acceptable, but for other situations it might not be. I must try to target this just to file uploads, even if that means moving them to a special virtual host.

Contacts

melo@simplicidade.org (XMPP/email)
+351 302 029 050 (voice)
melopt (Skype)

IronMan challenge

Iron Man badge Are you ready to be an Iron Man? Join the challenge and find out! (what is the meaning of this little man?)

Moosaico

Junta-te!

Recent Comments

Powered by Disqus
Creative Commons License
This weblog is licensed under a Creative Commons License.
Powered by
Movable Type 3.2