projects
/
project
/
uhttpd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d58f77a
)
relay: do not process headers after the first error
author
Felix Fietkau
<nbd@openwrt.org>
Thu, 23 May 2013 10:50:08 +0000
(12:50 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Thu, 23 May 2013 10:50:08 +0000
(12:50 +0200)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
relay.c
patch
|
blob
|
history
uhttpd.h
patch
|
blob
|
history
diff --git
a/relay.c
b/relay.c
index
1b55d41
..
0540bd8
100644
(file)
--- 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) {
/*
diff --git
a/uhttpd.h
b/uhttpd.h
index
59f1565
..
0137eef
100644
(file)
--- a/
uhttpd.h
+++ b/
uhttpd.h
@@
-150,6
+150,7
@@
struct relay {
struct client *cl;
bool process_done;
+ bool error;
int ret;
int header_ofs;