diff options
author | Arne Schwabe <arne@rfc2549.org> | 2013-09-21 16:21:44 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2013-09-21 16:21:44 +0200 |
commit | c95e727267fed5211f8c88a6708ff21a7f57eed2 (patch) | |
tree | c035b0562ff64da249bff0fafca335531c458eb0 /openvpn/src/openvpn/proxy.c | |
parent | 5f6f3bd69d858db070938bc838f844fe73f5ab3e (diff) |
Update to v3 of custom header patchv0.5.47
Diffstat (limited to 'openvpn/src/openvpn/proxy.c')
-rw-r--r-- | openvpn/src/openvpn/proxy.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/openvpn/src/openvpn/proxy.c b/openvpn/src/openvpn/proxy.c index 80f5b87a..db26994c 100644 --- a/openvpn/src/openvpn/proxy.c +++ b/openvpn/src/openvpn/proxy.c @@ -501,7 +501,7 @@ add_proxy_header (struct http_proxy_info *p, /* Check if any of the custom headers already provides Host: */ i=0; - while (p->options.custom_headers[i].name) + for (i=0; i < MAX_CUSTOM_HTTP_HEADER && p->options.custom_headers[i].name;i++) { if( ((!strcasecmp(p->options.custom_headers[i].name, "Host")) && @@ -532,12 +532,11 @@ add_proxy_header (struct http_proxy_info *p, return false; } - /* + /* * Send custom headers if provided * If content is NULL whole header is in name */ - i=0; - while (p->options.custom_headers[i].name) + for (i=0; i < MAX_CUSTOM_HTTP_HEADER && p->options.custom_headers[i].name;i++) { if (p->options.custom_headers[i].content) openvpn_snprintf (buf, sizeof(buf), "%s: %s", |