summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2013-06-02 18:02:46 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2013-06-02 18:02:46 +0000
commit2c2546e21fb0bd23428f8190d046508481682be9 (patch)
treeef0e0985789d842a76a0a47ff0de7253b8f8e716 /usr.sbin
parentdc37ea6b0c06ab67b8f98630cd0103f2a3e1238a (diff)
With HTTP keepalive, relayd only filtered the first request and
switched to pass-through mode for subsequent requests from the client. Make sure to stay in HTTP header mode. ok benno@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/relayd/relay_http.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/relayd/relay_http.c b/usr.sbin/relayd/relay_http.c
index 143f12b869e..5b933eb5412 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.14 2013/05/30 19:45:20 reyk Exp $ */
+/* $OpenBSD: relay_http.c,v 1.15 2013/06/02 18:02:45 reyk Exp $ */
/*
* Copyright (c) 2006 - 2012 Reyk Floeter <reyk@openbsd.org>
@@ -332,11 +332,11 @@ relay_read_http(struct bufferevent *bev, void *arg)
bev->readcb = relay_read_httpcontent;
/* Single-pass HTTP response */
- if (cre->toread < 0) {
+ if (cre->dir == RELAY_DIR_RESPONSE &&
+ cre->toread < 0) {
cre->toread = TOREAD_UNLIMITED;
bev->readcb = relay_read;
}
-
break;
default:
/* HTTP handler */