summaryrefslogtreecommitdiff
path: root/relay.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-05-23 12:50:08 +0200
committerFelix Fietkau <nbd@openwrt.org>2013-05-23 12:50:08 +0200
commit7aea691dfe1fb730ba40841e8c98e0541e1f2801 (patch)
tree837a6ea2d0fd744e173a8e6ada73df40980b74bf /relay.c
parentd58f77ad52caa52e91cf698e60a5a43c5d870e84 (diff)
relay: do not process headers after the first error
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'relay.c')
-rw-r--r--relay.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/relay.c b/relay.c
index 1b55d41..0540bd8 100644
--- a/relay.c
+++ b/relay.c
@@ -55,6 +55,7 @@ static void relay_error(struct relay *r)
struct ustream *s = &r->sfd.stream;
int len;
+ r->error = true;
s->eof = true;
ustream_get_read_buf(s, &len);
if (len)
@@ -118,7 +119,8 @@ static void relay_read_cb(struct ustream *s, int bytes)
if (r->process_done)
uloop_timeout_set(&r->timeout, 1);
- relay_process_headers(r);
+ if (!r->error)
+ relay_process_headers(r);
if (r->header_cb) {
/*