"CONNECT %s:%u HTTP/1.0\x0d\x0a"
"User-agent: libwebsockets\x0d\x0a",
lws_hdr_simple_ptr(wsi, _WSI_TOKEN_CLIENT_PEER_ADDRESS),
- wsi->u.hdr.c_port);
+ wsi->c_port);
if (wsi->vhost->proxy_basic_auth_token[0])
plen += sprintf((char *)pt->serv_buf + plen,
#ifdef LWS_USE_IPV6
if (LWS_IPV6_ENABLED(wsi->vhost)) {
memset(&server_addr6, 0, sizeof(struct sockaddr_in6));
- server_addr6.sin6_port = htons(wsi->u.hdr.c_port);
+ server_addr6.sin6_port = htons(wsi->c_port);
} else
#endif
- server_addr4.sin_port = htons(wsi->u.hdr.c_port);
+ server_addr4.sin_port = htons(wsi->c_port);
}
/*
if (lws_hdr_simple_create(wsi, _WSI_TOKEN_CLIENT_PEER_ADDRESS,
wsi->vhost->http_proxy_address))
goto failed;
- wsi->u.hdr.c_port = wsi->vhost->http_proxy_port;
+ wsi->c_port = wsi->vhost->http_proxy_port;
n = send(wsi->sock, (char *)pt->serv_buf, plen,
MSG_NOSIGNAL);
char origin[300] = "", protocol[300] = "", method[32] = "", *p;
struct lws *wsi = *pwsi;
- if (wsi->u.hdr.redirects == 3) {
+ if (wsi->redirects == 3) {
lwsl_err("%s: Too many redirects\n", __func__);
return NULL;
}
- wsi->u.hdr.redirects++;
+ wsi->redirects++;
#ifdef LWS_OPENSSL_SUPPORT
wsi->use_ssl = ssl;
wsi->state = LWSS_CLIENT_UNCONNECTED;
wsi->protocol = NULL;
wsi->pending_timeout = NO_PENDING_TIMEOUT;
- wsi->u.hdr.c_port = port;
+ wsi->c_port = port;
wsi->hdr_parsing_completed = 0;
_lws_header_table_reset(wsi->u.hdr.ah);
wsi->state = LWSS_CLIENT_UNCONNECTED;
wsi->pending_timeout = NO_PENDING_TIMEOUT;
wsi->position_in_fds_table = -1;
- wsi->u.hdr.c_port = i->port;
+ wsi->c_port = i->port;
wsi->vhost = i->vhost;
if (!wsi->vhost)
wsi->vhost = i->context->vhost_list;
if (lws_ext_cb_all_exts(wsi->context, wsi,
LWS_EXT_CB_CAN_PROXY_CLIENT_CONNECTION,
(void *)stash->address,
- wsi->u.hdr.c_port) > 0) {
+ wsi->c_port) > 0) {
lwsl_client("lws_client_connect: ext handling conn\n");
lws_set_timeout(wsi,
enum uri_esc_states ues;
short lextable_pos;
unsigned int current_token_limit;
-#ifndef LWS_NO_CLIENT
- unsigned short c_port;
-#endif
+
char esc_stash;
char post_literal_equal;
unsigned char parser_state; /* enum lws_token_indexes */
- char redirects;
};
#if defined(LWS_WITH_RANGES)
unsigned int redirect_to_https:1;
#endif
+#ifndef LWS_NO_CLIENT
+ unsigned short c_port;
+#endif
+
/* chars */
#ifndef LWS_NO_EXTENSIONS
unsigned char count_act_ext;
char pps; /* enum lws_pending_protocol_send */
char tsi; /* thread service index we belong to */
char protocol_interpret_idx;
+ char redirects;
#ifdef LWS_WITH_CGI
char cgi_channel; /* which of stdin/out/err */
char hdr_state;