Fix mod_magnet to set con->mode = p->id if it generates content, so returning 4xx/5xx doesn't append an error page

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2155 152afb58-edef-0310-8abb-c4023f1b3aa9
This commit is contained in:
Stefan Bühler 2008-04-23 19:27:12 +00:00
parent ac92ea3616
commit 73189c64e7
2 changed files with 4 additions and 1 deletions

1
NEWS
View File

@ -20,6 +20,7 @@ NEWS
* Overwrite Content-Type header in mod_dirlisting instead of inserting (#1614), patch by Henrik Holst
* Handle EINTR in mod_cgi during write() (#1640)
* Allow all http status codes by default; disable body only for 204,205 and 304; generate error pages for 4xx and 5xx (#1639)
* Fix mod_magnet to set con->mode = p->id if it generates content, so returning 4xx/5xx doesn't append an error page
- 1.4.19 - 2008-03-10

View File

@ -767,11 +767,13 @@ static handler_t magnet_attract(server *srv, connection *con, plugin_data *p, bu
if (lua_return_value > 99) {
con->http_status = lua_return_value;
con->file_finished = 1;
/* try { ...*/
if (0 == setjmp(exceptionjmp)) {
magnet_attach_content(srv, con, p, L);
if (!chunkqueue_is_empty(con->write_queue)) {
con->mode = p->id;
}
} else {
/* } catch () { */
con->http_status = 500;