1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

ss: http: make sure we dont duplicate leading path slash if already present

This commit is contained in:
Jed Lu 2020-12-15 17:53:38 -08:00 committed by Andy Green
parent 19935e5861
commit 3c661ede9e

View file

@ -955,6 +955,11 @@ secstream_connect_munge_h1(lws_ss_handle_t *h, char *buf, size_t len,
/* protocol aux is the path part */
i->path = buf;
/* skip the unnessary '/' */
if (*pbasis == '/')
pbasis = pbasis + 1;
buf[0] = '/';
lws_strexp_init(&exp, (void *)h, lws_ss_exp_cb_metadata, buf + 1, len - 1);