[OpenWrt-Devel] proc: cancel script killing only if process ends
diff mbox series

Message ID mailman.2620.1570743730.2486.openwrt-devel@lists.openwrt.org
State New
Headers show
Series
  • [OpenWrt-Devel] proc: cancel script killing only if process ends
Related show

Commit Message

Thomas Albers via openwrt-devel Oct. 10, 2019, 9:35 p.m. UTC
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
Before this change if the cgi script hangs after writing headers
then the process will never be killed. Let's only cancel the timeout
if the process ends.

Signed-off-by: Santiago Piccinini <spiccinini@altermundi.net>
---
 proc.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Thomas Albers via openwrt-devel Oct. 10, 2019, 9:55 p.m. UTC | #1
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
Hi! I forgot to mention that this patch is for uhttpd.

Best!
SAn

Patch
diff mbox series

diff --git a/proc.c b/proc.c
index 1d63d86..2b69703 100644
--- a/proc.c
+++ b/proc.c
@@ -225,11 +225,9 @@  static void proc_handle_header(struct relay *r, const char *name, const char *va
 static void proc_handle_header_end(struct relay *r)
 {
 	struct client *cl = r->cl;
-	struct dispatch_proc *p = &cl->dispatch.proc;
 	struct blob_attr *cur;
 	int rem;
 
-	uloop_timeout_cancel(&p->timeout);
 	uh_http_header(cl, cl->dispatch.proc.status_code, cl->dispatch.proc.status_msg);
 	blob_for_each_attr(cur, cl->dispatch.proc.hdr.head, rem)
 		ustream_printf(cl->us, "%s: %s\r\n", blobmsg_name(cur),