mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-27 15:01:03 +08:00
Fix WS connections to URLs that don't end in /
Same as in mg_connect_http_opt().
This commit is contained in:
parent
0c4d364cee
commit
a1fcbb0718
@ -10257,7 +10257,7 @@ void mg_send_websocket_handshake3(struct mg_connection *nc, const char *path,
|
||||
}
|
||||
|
||||
void mg_send_websocket_handshake3v(struct mg_connection *nc,
|
||||
const struct mg_str path,
|
||||
const struct mg_str path_in,
|
||||
const struct mg_str host,
|
||||
const struct mg_str protocol,
|
||||
const struct mg_str extra_headers,
|
||||
@ -10276,6 +10276,7 @@ void mg_send_websocket_handshake3v(struct mg_connection *nc,
|
||||
if (user.len > 0) {
|
||||
mg_basic_auth_header(user, pass, &auth);
|
||||
}
|
||||
const struct mg_str path = (path_in.len > 0 ? path_in : mg_mk_str("/"));
|
||||
|
||||
/*
|
||||
* NOTE: the (auth.buf == NULL ? "" : auth.buf) is because cc3200 libc is
|
||||
|
@ -424,7 +424,7 @@ void mg_send_websocket_handshake3(struct mg_connection *nc, const char *path,
|
||||
}
|
||||
|
||||
void mg_send_websocket_handshake3v(struct mg_connection *nc,
|
||||
const struct mg_str path,
|
||||
const struct mg_str path_in,
|
||||
const struct mg_str host,
|
||||
const struct mg_str protocol,
|
||||
const struct mg_str extra_headers,
|
||||
@ -443,6 +443,7 @@ void mg_send_websocket_handshake3v(struct mg_connection *nc,
|
||||
if (user.len > 0) {
|
||||
mg_basic_auth_header(user, pass, &auth);
|
||||
}
|
||||
const struct mg_str path = (path_in.len > 0 ? path_in : mg_mk_str("/"));
|
||||
|
||||
/*
|
||||
* NOTE: the (auth.buf == NULL ? "" : auth.buf) is because cc3200 libc is
|
||||
|
Loading…
x
Reference in New Issue
Block a user