Skip to content
Snippets Groups Projects
Commit d03c57b8 authored by Andy Green's avatar Andy Green
Browse files

quench logging

parent e66937a5
Branches
Tags
No related merge requests found
...@@ -164,7 +164,7 @@ lws_callback_http_dummy(struct lws *wsi, enum lws_callback_reasons reason, ...@@ -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; 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); __func__, wsi);
n = lws_write(wsi, wsi->http.pending_return_headers + LWS_PRE, n = lws_write(wsi, wsi->http.pending_return_headers + LWS_PRE,
wsi->http.pending_return_headers_len, wsi->http.pending_return_headers_len,
...@@ -351,7 +351,7 @@ lws_callback_http_dummy(struct lws *wsi, enum lws_callback_reasons reason, ...@@ -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; 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); lws_callback_on_writable(parent);
break; } break; }
... ...
......
...@@ -983,7 +983,7 @@ lws_cgi_kill(struct lws *wsi) ...@@ -983,7 +983,7 @@ lws_cgi_kill(struct lws *wsi)
if (n < 0) { if (n < 0) {
n = kill(wsi->http.cgi->pid, SIGKILL); n = kill(wsi->http.cgi->pid, SIGKILL);
if (n < 0) if (n < 0)
lwsl_err("%s: SIGKILL PID %d " lwsl_info("%s: SIGKILL PID %d "
"failed errno %d " "failed errno %d "
"(maybe zombie)\n", "(maybe zombie)\n",
__func__, __func__,
... ...
......
...@@ -1121,7 +1121,7 @@ lws_http_client_read(struct lws *wsi, char **buf, int *len) ...@@ -1121,7 +1121,7 @@ lws_http_client_read(struct lws *wsi, char **buf, int *len)
lws_change_pollfd(wsi, 0, LWS_POLLIN); lws_change_pollfd(wsi, 0, LWS_POLLIN);
if (rlen == LWS_SSL_CAPABLE_ERROR) { if (rlen == LWS_SSL_CAPABLE_ERROR) {
lwsl_notice("%s: SSL capable error\n", __func__); lwsl_debug("%s: SSL capable error\n", __func__);
return -1; return -1;
} }
... ...
......
...@@ -472,7 +472,7 @@ lws_urldecode_spa_cb(void *data, const char *name, char **buf, int len, ...@@ -472,7 +472,7 @@ lws_urldecode_spa_cb(void *data, const char *name, char **buf, int len,
spa->params[n] = *buf; spa->params[n] = *buf;
if ((*buf) + len >= spa->end) { if ((*buf) + len >= spa->end) {
lwsl_notice("%s: exceeded storage\n", __func__); lwsl_info("%s: exceeded storage\n", __func__);
return -1; return -1;
} }
... ...
......
...@@ -955,7 +955,7 @@ lws_http_action(struct lws *wsi) ...@@ -955,7 +955,7 @@ lws_http_action(struct lws *wsi)
wsi->http.rx_content_length = atoll(content_length_str); wsi->http.rx_content_length = atoll(content_length_str);
if (!wsi->http.rx_content_length) { if (!wsi->http.rx_content_length) {
wsi->http.content_length_explicitly_zero = 1; wsi->http.content_length_explicitly_zero = 1;
lwsl_notice("%s: explicit 0 content-length\n", lwsl_debug("%s: explicit 0 content-length\n",
__func__); __func__);
} }
} }
...@@ -1253,12 +1253,22 @@ lws_http_action(struct lws *wsi) ...@@ -1253,12 +1253,22 @@ lws_http_action(struct lws *wsi)
if (pcolon) if (pcolon)
i.port = atoi(pcolon + 1); i.port = atoi(pcolon + 1);
lws_snprintf(rpath, sizeof(rpath) - 1, "/%s/%s", pslash + 1, n = lws_snprintf(rpath, sizeof(rpath) - 1, "/%s/%s",
uri_ptr + hit->mountpoint_len); pslash + 1, uri_ptr +
hit->mountpoint_len);
lws_clean_url(rpath); lws_clean_url(rpath);
na = lws_hdr_total_length(wsi, WSI_TOKEN_HTTP_URI_ARGS); na = lws_hdr_total_length(wsi, WSI_TOKEN_HTTP_URI_ARGS);
if (na) { 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++ = '?'; *p++ = '?';
lws_hdr_copy(wsi, p, &rpath[sizeof(rpath) - 1] - p, lws_hdr_copy(wsi, p, &rpath[sizeof(rpath) - 1] - p,
WSI_TOKEN_HTTP_URI_ARGS); WSI_TOKEN_HTTP_URI_ARGS);
... ...
......
...@@ -252,7 +252,7 @@ lws_ssl_capable_read(struct lws *wsi, unsigned char *buf, int len) ...@@ -252,7 +252,7 @@ lws_ssl_capable_read(struct lws *wsi, unsigned char *buf, int len)
*/ */
if (n <= 0) { if (n <= 0) {
m = lws_ssl_get_error(wsi, n); 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 */ if (m == SSL_ERROR_ZERO_RETURN) /* cleanly shut down */
return LWS_SSL_CAPABLE_ERROR; return LWS_SSL_CAPABLE_ERROR;
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment