mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
quench logging
This commit is contained in:
parent
e66937a5e7
commit
d03c57b87f
6 changed files with 20 additions and 10 deletions
|
@ -164,7 +164,7 @@ lws_callback_http_dummy(struct lws *wsi, enum lws_callback_reasons reason,
|
|||
|
||||
wsi->reason_bf &= ~LWS_CB_REASON_AUX_BF__PROXY_HEADERS;
|
||||
|
||||
lwsl_notice("%s: %p: issuing proxy headers\n",
|
||||
lwsl_debug("%s: %p: issuing proxy headers\n",
|
||||
__func__, wsi);
|
||||
n = lws_write(wsi, wsi->http.pending_return_headers + LWS_PRE,
|
||||
wsi->http.pending_return_headers_len,
|
||||
|
@ -351,7 +351,7 @@ lws_callback_http_dummy(struct lws *wsi, enum lws_callback_reasons reason,
|
|||
|
||||
parent->reason_bf |= LWS_CB_REASON_AUX_BF__PROXY_HEADERS;
|
||||
|
||||
lwsl_notice("%s: LWS_CALLBACK_ESTABLISHED_CLIENT_HTTP: prepared headers\n", __func__);
|
||||
lwsl_debug("%s: LWS_CALLBACK_ESTABLISHED_CLIENT_HTTP: prepared headers\n", __func__);
|
||||
lws_callback_on_writable(parent);
|
||||
|
||||
break; }
|
||||
|
|
|
@ -983,7 +983,7 @@ lws_cgi_kill(struct lws *wsi)
|
|||
if (n < 0) {
|
||||
n = kill(wsi->http.cgi->pid, SIGKILL);
|
||||
if (n < 0)
|
||||
lwsl_err("%s: SIGKILL PID %d "
|
||||
lwsl_info("%s: SIGKILL PID %d "
|
||||
"failed errno %d "
|
||||
"(maybe zombie)\n",
|
||||
__func__,
|
||||
|
|
|
@ -1121,7 +1121,7 @@ lws_http_client_read(struct lws *wsi, char **buf, int *len)
|
|||
lws_change_pollfd(wsi, 0, LWS_POLLIN);
|
||||
|
||||
if (rlen == LWS_SSL_CAPABLE_ERROR) {
|
||||
lwsl_notice("%s: SSL capable error\n", __func__);
|
||||
lwsl_debug("%s: SSL capable error\n", __func__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -472,7 +472,7 @@ lws_urldecode_spa_cb(void *data, const char *name, char **buf, int len,
|
|||
spa->params[n] = *buf;
|
||||
|
||||
if ((*buf) + len >= spa->end) {
|
||||
lwsl_notice("%s: exceeded storage\n", __func__);
|
||||
lwsl_info("%s: exceeded storage\n", __func__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -955,7 +955,7 @@ lws_http_action(struct lws *wsi)
|
|||
wsi->http.rx_content_length = atoll(content_length_str);
|
||||
if (!wsi->http.rx_content_length) {
|
||||
wsi->http.content_length_explicitly_zero = 1;
|
||||
lwsl_notice("%s: explicit 0 content-length\n",
|
||||
lwsl_debug("%s: explicit 0 content-length\n",
|
||||
__func__);
|
||||
}
|
||||
}
|
||||
|
@ -1253,12 +1253,22 @@ lws_http_action(struct lws *wsi)
|
|||
if (pcolon)
|
||||
i.port = atoi(pcolon + 1);
|
||||
|
||||
lws_snprintf(rpath, sizeof(rpath) - 1, "/%s/%s", pslash + 1,
|
||||
uri_ptr + hit->mountpoint_len);
|
||||
n = lws_snprintf(rpath, sizeof(rpath) - 1, "/%s/%s",
|
||||
pslash + 1, uri_ptr +
|
||||
hit->mountpoint_len);
|
||||
lws_clean_url(rpath);
|
||||
na = lws_hdr_total_length(wsi, WSI_TOKEN_HTTP_URI_ARGS);
|
||||
if (na) {
|
||||
char *p = rpath + strlen(rpath);
|
||||
char *p = rpath + n;
|
||||
|
||||
if (na >= (int)sizeof(rpath) - n - 2) {
|
||||
lwsl_info("%s: query string %d longer "
|
||||
"than we can handle\n", __func__,
|
||||
na);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
*p++ = '?';
|
||||
lws_hdr_copy(wsi, p, &rpath[sizeof(rpath) - 1] - p,
|
||||
WSI_TOKEN_HTTP_URI_ARGS);
|
||||
|
|
|
@ -252,7 +252,7 @@ lws_ssl_capable_read(struct lws *wsi, unsigned char *buf, int len)
|
|||
*/
|
||||
if (n <= 0) {
|
||||
m = lws_ssl_get_error(wsi, n);
|
||||
lwsl_notice("%p: ssl err %d errno %d\n", wsi, m, errno);
|
||||
lwsl_debug("%p: ssl err %d errno %d\n", wsi, m, errno);
|
||||
if (m == SSL_ERROR_ZERO_RETURN) /* cleanly shut down */
|
||||
return LWS_SSL_CAPABLE_ERROR;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue