openbsd-ports/www/lighttpd/patches/patch-src_mod_magnet_c
jasper bfe8448a3a - Handle EINTR in mod_cgi during write()
- Fix mod_magnet to set con->mode = p->id if it generates content,
  so returning 4xx/5xx doesn't append an error page

from brad@
2008-04-25 10:23:07 +00:00

19 lines
588 B
Plaintext

$OpenBSD: patch-src_mod_magnet_c,v 1.1 2008/04/25 10:23:07 jasper Exp $
--- src/mod_magnet.c.orig Thu Apr 24 01:16:35 2008
+++ src/mod_magnet.c Thu Apr 24 01:17:24 2008
@@ -761,11 +761,13 @@ static handler_t magnet_attract(server *srv, connectio
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;