Use break instead of return so that a HEAD request still consumes all data.
authorclaudio <claudio@openbsd.org>
Fri, 12 Aug 2022 08:40:25 +0000 (08:40 +0000)
committerclaudio <claudio@openbsd.org>
Fri, 12 Aug 2022 08:40:25 +0000 (08:40 +0000)
OK op@

usr.sbin/httpd/server_fcgi.c

index 4b2c269..e29ad99 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: server_fcgi.c,v 1.92 2022/08/12 06:41:41 op Exp $     */
+/*     $OpenBSD: server_fcgi.c,v 1.93 2022/08/12 08:40:25 claudio Exp $        */
 
 /*
  * Copyright (c) 2014 Florian Obser <florian@openbsd.org>
@@ -584,7 +584,7 @@ server_fcgi_read(struct bufferevent *bev, void *arg)
                                    ((struct http_descriptor *)
                                    clt->clt_descreq)->http_method
                                    == HTTP_METHOD_HEAD)
-                                       return;
+                                       break;
                                if (server_fcgi_writechunk(clt) == -1) {
                                        server_abort_http(clt, 500,
                                            "encoding error");