summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd
diff options
context:
space:
mode:
authorAnton Lindqvist <anton@cvs.openbsd.org>2024-07-20 06:54:16 +0000
committerAnton Lindqvist <anton@cvs.openbsd.org>2024-07-20 06:54:16 +0000
commitf741e0769e29f3008458e3a1394faba128b9c179 (patch)
tree28800a61d448fcc812eb1761e51c552c6ac49e99 /usr.sbin/relayd
parent37f22cb8afa67eb9115b60b7c2957f4184219d14 (diff)
Fix regression introduced in previous causing HEAD requests to be
erroneously rejected as malformed. ok chrisz@
Diffstat (limited to 'usr.sbin/relayd')
-rw-r--r--usr.sbin/relayd/relay_http.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/relayd/relay_http.c b/usr.sbin/relayd/relay_http.c
index cc51fde181c..0c511d0b9eb 100644
--- a/usr.sbin/relayd/relay_http.c
+++ b/usr.sbin/relayd/relay_http.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: relay_http.c,v 1.89 2024/07/19 04:26:23 chrisz Exp $ */
+/* $OpenBSD: relay_http.c,v 1.90 2024/07/20 06:54:15 anton Exp $ */
/*
* Copyright (c) 2006 - 2016 Reyk Floeter <reyk@openbsd.org>
@@ -435,6 +435,10 @@ relay_read_http(struct bufferevent *bev, void *arg)
kv_delete(&desc->http_headers,
desc->http_lastheader);
break;
+ case HTTP_METHOD_RESPONSE:
+ if (request_method == HTTP_METHOD_HEAD)
+ break;
+ /* FALLTHROUGH */
default:
/*
* Need to read data from the client