mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-30 00:00:16 +01:00
http_proxy: deal with redundant protocol leader
https://github.com/warmcat/libwebsockets/issues/764
This commit is contained in:
parent
76985f256d
commit
71bb400805
1 changed files with 4 additions and 0 deletions
|
@ -1046,6 +1046,10 @@ lws_set_proxy(struct lws_vhost *vhost, const char *proxy)
|
||||||
if (!proxy)
|
if (!proxy)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
/* we have to deal with a possible redundant leading http:// */
|
||||||
|
if (!strncmp(proxy, "http://", 7))
|
||||||
|
proxy += 7;
|
||||||
|
|
||||||
p = strchr(proxy, '@');
|
p = strchr(proxy, '@');
|
||||||
if (p) { /* auth is around */
|
if (p) { /* auth is around */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue