if (lws_cgi_write_split_stdout_headers(wsi) < 0)
return -1;
- wsi->reason_bf &= ~1;
+ if (wsi->reason_bf & 8)
+ wsi->reason_bf &= ~8;
+ else
+ wsi->reason_bf &= ~1;
break;
}
#endif
vh->name = info->vhost_name;
vh->iface = info->iface;
+#if !defined(LWS_WITH_ESP8266) && !defined(LWS_WITH_ESP32) && !defined(OPTEE_TA) && !defined(WIN32)
+ vh->bind_iface = info->bind_iface;
+#endif
+
for (vh->count_protocols = 0;
info->protocols[vh->count_protocols].callback;
vh->count_protocols++)
#if !defined(LWS_WITH_ESP8266)
vh->http_proxy_port = 0;
vh->http_proxy_address[0] = '\0';
+#if defined(LWS_WITH_SOCKS5)
+ vh->socks_proxy_port = 0;
+ vh->socks_proxy_address[0] = '\0';
+#endif
/* either use proxy from info, or try get it from env var */
+ /* http proxy */
if (info->http_proxy_address) {
/* override for backwards compatibility */
if (info->http_proxy_port)
lws_set_proxy(vh, p);
#endif
}
+#if defined(LWS_WITH_SOCKS5)
+ /* socks proxy */
+ if (info->socks_proxy_address) {
+ /* override for backwards compatibility */
+ if (info->socks_proxy_port)
+ vh->socks_proxy_port = info->socks_proxy_port;
+ lws_set_socks(vh, info->socks_proxy_address);
+ } else {
+#ifdef LWS_HAVE_GETENV
+ p = getenv("socks_proxy");
+ if (p)
+ lws_set_socks(vh, p);
#endif
+ }
+#endif
+#endif
+
vh->ka_time = info->ka_time;
vh->ka_interval = info->ka_interval;
vh->ka_probes = info->ka_probes;
context->uid = info->uid;
context->gid = info->gid;
+#if defined(LWS_HAVE_SYS_CAPABILITY_H) && defined(LWS_HAVE_LIBCAP)
+ memcpy(context->caps, info->caps, sizeof(context->caps));
+ context->count_caps = info->count_caps;
+#endif
+
/*
* drop any root privs for this process
* to listen on port < 1023 we would have needed root, but now we are