[Libwebsockets] uri-args

Joel Winarske joel.winarske at gmail.com
Fri Mar 31 00:41:37 CEST 2017

Hi Andy,

I'm calling the below in LWS_CALLBACK_HTTP, and am seeing the uri-args
value without any instances of "&".

int len = lws_hdr_total_length(wsi, WSI_TOKEN_HTTP_URI_ARGS);

if (len) {
vhd->uri_args = malloc(len + 1);
vhd->uri_args[len] = '\0';
lws_hdr_copy(wsi, uri_args, len + 1, WSI_TOKEN_HTTP_URI_ARGS);
lwsl_info("[%s]", uri_args);

Is there a recommended way to parse uri-args?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20170330/23aaad17/attachment.html>

More information about the Libwebsockets mailing list