Commit 7d6f188ce7f3cdb7221b92b233e2033b31a1ae2c

Thomas de Grivel 2024-09-11T16:45:29

err_puts

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/http/http_request.c b/http/http_request.c
index 051a2e2..6b80c62 100644
--- a/http/http_request.c
+++ b/http/http_request.c
@@ -51,12 +51,15 @@ const s_sym ** http_request_buf_parse_method (s_buf *buf,
     str.free.pchar[sym->str.size] = ' ';
     str.free.pchar[sym->str.size + 1] = 0;
     if (buf_read_str(buf, &str) > 0) {
+      str_clean(&str);
       *dest = sym;
       buf_save_clean(buf, &save);
       return dest;
     }
+    str_clean(&str);
     m = list_next(m);
   }
+  err_puts("http_request_buf_parse_method: no method");
  restore:
   buf_save_restore_rpos(buf, &save);
   buf_save_clean(buf, &save);