projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed20896
)
Allow non-empty lines after status code from a HTTP proxy.
author
Guus Sliepen
<guus@tinc-vpn.org>
Thu, 13 Oct 2016 14:45:37 +0000
(16:45 +0200)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Thu, 13 Oct 2016 14:45:37 +0000
(16:45 +0200)
src/proxy.c
patch
|
blob
|
history
diff --git
a/src/proxy.c
b/src/proxy.c
index
e30c1fb
..
2b8f87c
100644
(file)
--- a/
src/proxy.c
+++ b/
src/proxy.c
@@
-256,7
+256,12
@@
int receive_proxy_meta(connection_t *c, int start, int lenin) {
char *p = memchr(c->buffer, '\n', c->buflen);
if(!p || p - c->buffer >= c->buflen)
return 0;
- p = memchr(p + 1, '\n', c->buflen - (p + 1 - c->buffer));
+
+ while(p = memchr(p + 1, '\n', c->buflen - (p + 1 - c->buffer))) {
+ if(p[-1] == '\n')
+ break;
+ }
+
if(!p)
return 0;