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
@@ -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