Commit 3c3a4015cac1db93dc49ff5184a60844fc92eaf5

Thomas de Grivel 2024-09-14T17:02:49

fix route for HEAD requests

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/test/httpd/app/controllers/doc_controller.kc3 b/test/httpd/app/controllers/doc_controller.kc3
index 2cf86d7..3b0b56b 100644
--- a/test/httpd/app/controllers/doc_controller.kc3
+++ b/test/httpd/app/controllers/doc_controller.kc3
@@ -81,7 +81,8 @@ defmodule DocController do
   }
 
   def route = fn (request) {
-    if (request.method == GET) do
+    if (request.method == GET ||
+        request.method == HEAD) do
       locale = "en"
       path_html = ".#{request.url}/index.#{locale}.html"
       if File.exists?(path_html) do