Martin Honermeyer | 22 Feb 02:57

Problems with 503 page returned by mod_magnet

Hello guys,

first of all, thanks for this wonderful piece of software! Running Lighttpd 
1.5 for about half a year now, updating to HEAD now and then. A few stability 
issues at the beginning have been resolved after a while.

We have one problem though. We try to show a custom 503 page when our 
application is down for maintainance, like described over here: 
http://johnleach.co.uk/words/archives/2007/01/10/251/

From lighttpd.conf:

magnet.attract-raw-url-to = ( "/etc/lighttpd-1.5/magnet.lua" )

magnet.lua

if (lighty.stat("/u/apps/ss2-rails/shared/system/maintenance.html")) then
	lighty.status["maintenance.hits"] = lighty.status["maintenance.hits"] + 1
	lighty.content = { { filename 
= "/u/apps/ss2-rails/shared/system/maintenance.html" } }
	lighty.header["Content-Type"] = "text/html"
	return 503
end

When using curl or or a text browser (links), the page is correctly displayed 
(although the default error message is appended, see 
http://trac.lighttpd.net/trac/ticket/1420). In "real" browsers like Firefox 
and Konqueror, the page just loads forever, waiting for data to arrive (?). 

Furthermore,  I tried using "server.errorfile-prefix" with a custom 503 page 
(Continue reading)


Gmane