Commit be3669f84b9aa911f7a6553e74d910d538d9bc05

Thomas de Grivel 2024-09-13T21:18:46

wip http_request

diff --git a/http/http_request.c b/http/http_request.c
index fb86e4d..89ffd4c 100644
--- a/http/http_request.c
+++ b/http/http_request.c
@@ -91,7 +91,7 @@ s_tag * http_request_buf_parse (s_tag *req, s_buf *buf)
   buf_save_init(buf, &save);
   if (! http_request_buf_parse_method(buf, &tmp_req.method))
     goto restore;
-  if (true) {
+  if (false) {
     err_write_1("http_request_buf_parse: method: ");
     err_inspect_tag(&tmp_req.method);
     err_write_1("\n");
@@ -100,14 +100,14 @@ s_tag * http_request_buf_parse (s_tag *req, s_buf *buf)
     err_puts("http_request_buf_parse: invalid URL");
     goto restore;
   }
-  if (true) {
+  if (false) {
     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) {
+  if (false) {
     err_write_1("http_request_buf_parse: url: ");
     err_inspect_str(&tmp_req.url);
     err_write_1("\n");
@@ -116,7 +116,7 @@ s_tag * http_request_buf_parse (s_tag *req, s_buf *buf)
     err_puts("http_request_buf_parse: invalid protocol");
     goto restore;
   }
-  if (true) {
+  if (false) {
     err_write_1("http_request_buf_parse: protocol: ");
     err_inspect_str(&tmp_req.protocol);
     err_write_1("\n");
diff --git a/test/http/07_client_server.kc3 b/test/http/07_client_server.kc3
index 09c4219..7ecec58 100644
--- a/test/http/07_client_server.kc3
+++ b/test/http/07_client_server.kc3
@@ -4,11 +4,11 @@ quote client = Socket.Buf.connect("localhost", "57000")
 client = Socket.Buf.connect("localhost", "57000")
 quote server_client = Socket.Buf.accept(server)
 server_client = Socket.Buf.accept(server)
-quote client_req = %HTTP.Request{method: :get,
+quote client_req = %HTTP.Request{method: GET,
                                  url: "/",
                                  protocol: "HTTP/1.1",
                                  headers: []}
-client_req = %HTTP.Request{method: :get,
+client_req = %HTTP.Request{method: GET,
                            url: "/",
                            protocol: "HTTP/1.1",
                            headers: []}
diff --git a/test/http/07_client_server.out.expected b/test/http/07_client_server.out.expected
index 1c99d97..defac7d 100644
--- a/test/http/07_client_server.out.expected
+++ b/test/http/07_client_server.out.expected
@@ -1,4 +1,4 @@
-%HTTP.Request{method: :get,
+%HTTP.Request{method: GET,
               url: "/",
               protocol: "HTTP/1.1",
               headers: []}