Tag Archives: linux

lighty 1.4.26 in debian lenny

Recently I’ve been playing around with SWFUpload v2.2.0.  In testing, I discovered that I would always receive back from the server an HTTP 400 “Bad Request” when the uploader tried to POST.  I run Debian Lenny and Lighty. Now, Lenny ships with Lighttpd 1.4.19 and my browser has Shockwave Flash 10.0 r42 (OS 10.5, Firefox 3.6.2). Flash seems to send an erroneous “Expect: 100-Continue” HTTP header during HTTP POST operations. Apparently some servers, like Apache, will silently ignore this and allow the operation, however Lighty does not.

Before researching this more, I decided that backporting the version of Lighty from Debian Squeeze (testing) to Lenny might solve this issue. Following these instructions I built a deb package in Lenny based on source from Squeeze and installed Lighty 1.4.26.

Although the backport functions well, it seems that even though Lighty (as of version 1.4.21) allows you to set a custom configuration value to ignore the erroneous 100-Continue header, it still cannot handle the Flash mulit-part boundary bug. Alas, we have to wait until Lighty 1.5 to get this working which I’m unwilling to run in production right now.

Since others might find the backport of Lighty 1.4.26 to Lenny useful, here it is:

http://www.jonmoniaci.com/debian-ppa/pool/main/l/lighttpd/

download and install as root with:

wget http://www.jonmoniaci.com/debian-ppa/pool/main/l/lighttpd/lighttpd_1.4.26-1~bpo50+1_i386.deb
dpkg -i lighttpd_1.4.26-1~bpo50+1_i386.deb

I have not tested the other portions of the backport (mysql vhosts, etc), since I only use the main server.

UPDATE! 2010-05-07: I have recently created a Debian repository on my server so instead of just downloading and using dpkg -i to install the backport, you can add this to your /etc/apt/sources.list:

deb http://www.jonmoniaci.com/debian-ppa/ lenny main contrib non-free

Then:

aptitude update && aptitude install lighttpd

And it will install from my repository. Note that I have not signed the repository as of yet, so the packages will be considered “untrusted”.

UPDATE! 2010-10-18: The backported version of Lighttpd in the repository is now 1.4.28 (from Squeeze).

UPDATE! 2015-06-04: I no longer maintain my Debian PPA.