diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2013-02-15 12:15:13 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2013-02-15 12:15:13 +0000 |
commit | 909f1f37f626416cf9ec656dc2468e14f904ea91 (patch) | |
tree | 12980b125816183f3b293fbf957b377cd8e1600b /usr.sbin/relayd | |
parent | dc8e8c69822fb9355d89a4c5bef2c2d075bfa086 (diff) |
Fix the toread check in the lateconnect case. This allows
Content-Length: 0 in HTTP GET request when a request filter is used.
This was broken by my previous commit.
OK reyk@ benno@
Diffstat (limited to 'usr.sbin/relayd')
-rw-r--r-- | usr.sbin/relayd/relay_http.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/relayd/relay_http.c b/usr.sbin/relayd/relay_http.c index 143c683b101..4a8b3a4fbc9 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.8 2013/02/05 21:36:33 bluhm Exp $ */ +/* $OpenBSD: relay_http.c,v 1.9 2013/02/15 12:15:12 bluhm Exp $ */ /* * Copyright (c) 2006 - 2012 Reyk Floeter <reyk@openbsd.org> @@ -357,7 +357,7 @@ relay_read_http(struct bufferevent *bev, void *arg) relay_http_request_close(cre); done: - if (cre->dir == RELAY_DIR_REQUEST && cre->toread < 0 && + if (cre->dir == RELAY_DIR_REQUEST && cre->toread <= 0 && proto->lateconnect && cre->dst->bev == NULL) { if (rlay->rl_conf.fwdmode == FWD_TRANS) { relay_bindanyreq(con, 0, IPPROTO_TCP); |