Commit 5b1dccf6137150536aedb6f80a31336485ed3546

Thomas de Grivel 2024-09-13T13:21:20

debug

diff --git a/http/http_request.c b/http/http_request.c
index 2ea2e03..7e3e6d4 100644
--- a/http/http_request.c
+++ b/http/http_request.c
@@ -87,7 +87,7 @@ s_tag * http_request_buf_parse (s_tag *req, s_buf *buf)
   assert(buf);
   buf_save_init(buf, &save);
   if (! http_request_buf_parse_method(buf, &tmp_req.method))
-    goto clean;
+    goto restore;
   if (true) {
     err_write_1("http_request_buf_parse: method: ");
     err_inspect_tag(&tmp_req.method);
@@ -97,18 +97,23 @@ s_tag * http_request_buf_parse (s_tag *req, s_buf *buf)
     err_puts("http_request_buf_parse: invalid URL");
     goto restore;
   }
-  if (false) {
+  if (true) {
     err_write_1("http_request_buf_parse: url: ");
     err_inspect_str(&url);
     err_write_1("\n");
   }
   url_unescape(&url, &tmp_req.url);
   str_clean(&url);
+  if (true) {
+    err_write_1("http_request_buf_parse: url: ");
+    err_inspect_str(&tmp_req.url);
+    err_write_1("\n");
+  }
   if (! buf_read_until_1_into_str(buf, "\r\n", &tmp_req.protocol)) {
     err_puts("http_request_buf_parse: invalid protocol");
     goto restore;
   }
-  if (false) {
+  if (true) {
     err_write_1("http_request_buf_parse: protocol: ");
     err_inspect_str(&tmp_req.protocol);
     err_write_1("\n");