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

get_peer_simple: add to minimal-http-server-dynamic

This commit is contained in:
Andy Green 2019-10-12 12:20:13 +01:00
parent da8995bb61
commit cc425b1b98

View file

@ -52,6 +52,9 @@ callback_dynamic_http(struct lws *wsi, enum lws_callback_reasons reason,
/* in contains the url part after our mountpoint /dyn, if any */
lws_snprintf(pss->path, sizeof(pss->path), "%s", (const char *)in);
lws_get_peer_simple(wsi, (char *)buf, sizeof(buf));
lwsl_notice("%s: HTTP: connection %s\n", __func__, (const char *)buf);
/*
* prepare and write http headers... with regards to content-
* length, there are three approaches: