[hackers] [quark][PATCH] fix cached page log status

From: uypcas <uypcas_AT_gmail.com>
Date: Tue, 30 Dec 2025 15:12:00 +0000

fixed the status code logged when a response was a cache hit (304 Not Modified). without this patch, it gets logged as a 403 error, because it's a response to a GET request without a body

this is my first time using git-send-email, let me know if i did something wrong

---
 connection.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/connection.c b/connection.c
index 24de809..19808f7 100644
--- a/connection.c
+++ b/connection.c
_AT_@ -129,6 +129,9 @@ response:
 	case C_SEND_BODY:
 		if (c->req.method == M_GET) {
 			if (c->buf.len == 0) {
+				if (c->res.status == S_NOT_MODIFIED) {
+					break;
+				}
 				/* fill buffer with body data */
 				if ((s = data_fct[c->res.type](&c->res, &c->buf,
 				                               &c->progress))) {
-- 
2.47.3
Received on Tue Dec 30 2025 - 16:12:00 CET

This archive was generated by hypermail 2.3.0 : Tue Dec 30 2025 - 16:24:33 CET