Enhance logging

This commit is contained in:
2025-09-28 17:48:11 +02:00
parent e1a92729d2
commit 151c4804fe
6 changed files with 21 additions and 12 deletions
+4 -3
View File
@@ -656,11 +656,12 @@ int proxy_peek_response(proxy_ctx_t *proxy, http_res *res, http_status_ctx *ctx,
return header_len;
}
int proxy_send(proxy_ctx_t *proxy, sock *client, unsigned long len_to_send, int flags) {
long proxy_send(proxy_ctx_t *proxy, sock *client, unsigned long len_to_send, int flags) {
long ret;
char buffer[CHUNK_SIZE];
if (sock_splice(client, &proxy->proxy, buffer, sizeof(buffer), len_to_send) == -1)
if ((ret = sock_splice(client, &proxy->proxy, buffer, sizeof(buffer), len_to_send)) == -1)
return -1;
return 0;
return ret;
}
int proxy_dump(proxy_ctx_t *proxy, char *buf, long len) {
+1 -1
View File
@@ -45,7 +45,7 @@ int proxy_init(proxy_ctx_t **proxy, http_req *req, http_res *res, http_status_ct
int proxy_peek_response(proxy_ctx_t *proxy, http_res *res, http_status_ctx *ctx, http_status *custom_status, char *err_msg);
int proxy_send(proxy_ctx_t *proxy, sock *client, unsigned long len_to_send, int flags);
long proxy_send(proxy_ctx_t *proxy, sock *client, unsigned long len_to_send, int flags);
int proxy_dump(proxy_ctx_t *proxy, char *buf, long len);