Commit 0d72243a92f58f3fc589f29cdd9bf315a05da004

Thomas de Grivel 2024-10-07T22:14:42

fix http test 07_client_server request parser returns void body

diff --git a/.ikc3_history b/.ikc3_history
index 41cdc21..a058807 100644
--- a/.ikc3_history
+++ b/.ikc3_history
@@ -1,8 +1,3 @@
-HTTP.mime_type("txt")
-File.ext("Plop.html")
-HTTP.mime_type(File.ext("Plop.html"))
-(Str) HTTP.mime_type(File.ext("Plop.html"))
-Str.split((Str) HTTP.mime_type(File.ext("Plop.html")), "/")
 List.to_tuple(Str.split((Str) HTTP.mime_type(File.ext("Plop.html")), "/"))
 (Tuple) (Str.split((Str) HTTP.mime_type(File.ext("Plop.html")), "/"))
 (Str.split((Str) HTTP.mime_type(File.ext("Plop.html")), "/"))
@@ -97,4 +92,8 @@ Facts.with(db, [[KC3, :operator, op = ?], [op, :sym, sym = ?]], fn (fact) { puts
 Facts.with(Facts.env_db(), [[KC3, :operator, op = ?], [op, :sym, sym = ?]], fn (fact) { puts("#{op} #{sym}") })
 Facts.with(Facts.env_db(), [[KC3, :operator, op = ?], [op, :sym, sym = ?]], fn (fact) { puts("#{inspect(op)} #{inspect(sym)}") })
 [[KC3, :operator, op = ?], [op, :sym, sym = ?]]
-
+%HTTP.Request{}
+quote %HTTP.Request{}
+quote %HTTP.Request{url: "/plop"}
+quote %HTTP.Request{method: GET, url: "/plop"}
+quote %HTTP.Request{method: GET, url: "/plop", body: void}
diff --git a/test/http/07_client_server.out.expected b/test/http/07_client_server.out.expected
index defac7d..e94959c 100644
--- a/test/http/07_client_server.out.expected
+++ b/test/http/07_client_server.out.expected
@@ -1,7 +1,8 @@
 %HTTP.Request{method: GET,
               url: "/",
               protocol: "HTTP/1.1",
-              headers: []}
+              headers: [],
+              body: void}
 %HTTP.Response{protocol: "HTTP/1.1",
                code: (U16) 200,
                message: "OK",