[Libwebsockets] How to get query parameters in overridden file open

polan at os.pl polan at os.pl
Thu Nov 30 12:10:30 CET 2017


Hello,

what would be proper way to handle such scenario - request for file from virtual path with some parameters specified in query string, e.g.:
 http://foo.com/myfile.ext?param1=234&param2=987

In "struct lws_plat_file_ops"
we have
 lws_fop_fd_t (*LWS_FOP_OPEN)(const struct lws_plat_file_ops *fops,
 const char *filename, const char *vpath,
 lws_fop_flags_t *flags);
but lws_get_urlarg_by_name() requires current "lws*wsi".

In other words how to properly access "wsi" from file open callback in http server?

Best regards,
Anzey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20171130/d162eb76/attachment.html>


More information about the Libwebsockets mailing list