mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
log client IP of well-wishers
Although getting a million of these doesn't make any trouble for lws, the source should be logged.
This commit is contained in:
parent
52b55d8be5
commit
153cbf871f
1 changed files with 5 additions and 1 deletions
|
@ -1745,7 +1745,11 @@ lws_http_transaction_completed(struct lws *wsi)
|
|||
lws_access_log(wsi);
|
||||
|
||||
if (!wsi->hdr_parsing_completed) {
|
||||
lwsl_notice("%s: ignoring, ah parsing incomplete\n", __func__);
|
||||
char peer[64];
|
||||
lws_get_peer_simple(wsi, peer, sizeof(peer) - 1);
|
||||
peer[sizeof(peer) - 1] = '\0';
|
||||
lwsl_notice("%s: (from %s) ignoring, ah parsing incomplete\n",
|
||||
__func__, peer);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue