about summary refs log tree commit diff stats
path: root/src/loader/connecterror.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-12-12 19:57:24 +0100
committerbptato <nincsnevem662@gmail.com>2023-12-12 19:57:24 +0100
commit189e73f7092a69699f3a6ca39aa105d318baedd4 (patch)
treef363bc19211b30ee061a22c0c81bb03bb38558f4 /src/loader/connecterror.nim
parent820f0f0f039252533133c3bd1037a73036815a45 (diff)
downloadchawan-189e73f7092a69699f3a6ca39aa105d318baedd4.tar.gz
local CGI improvements, move data: to cgi-bin
error codes are WIP, not final yet...
Diffstat (limited to 'src/loader/connecterror.nim')
-rw-r--r--src/loader/connecterror.nim7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/loader/connecterror.nim b/src/loader/connecterror.nim
index 8f2f95d2..913e007f 100644
--- a/src/loader/connecterror.nim
+++ b/src/loader/connecterror.nim
@@ -1,6 +1,9 @@
 import bindings/curl
 
 type ConnectErrorCode* = enum
+  ERROR_CGI_NO_DATA = (-17, "CGI script returned no data")
+  ERROR_CGI_MALFORMED_HEADER = (-16, "CGI script returned a malformed header")
+  ERROR_CGI_INVALID_CHA_CONTROL = (-15, "CGI got invalid Cha-Control header")
   ERROR_TOO_MANY_REWRITES = (-14, "too many URI method map rewrites")
   ERROR_INVALID_URI_METHOD_ENTRY = (-13, "invalid URI method entry")
   ERROR_CGI_FILE_NOT_FOUND = (-12, "CGI file not found")
@@ -8,8 +11,8 @@ type ConnectErrorCode* = enum
   ERROR_FAIL_SETUP_CGI = (-10, "failed to set up CGI script")
   ERROR_NO_CGI_DIR = (-9, "no local-CGI directory configured")
   ERROR_INVALID_METHOD = (-8, "invalid method")
-  ERROR_INVALID_DATA_URL = (-7, "invalid data URL")
-  ERROR_ABOUT_PAGE_NOT_FOUND = (-6, "about page not found")
+  ERROR_INVALID_URL = (-7, "invalid URL")
+  ERROR_CONNECTION_REFUSED = (-6, "connection refused")
   ERROR_FILE_NOT_FOUND = (-5, "file not found")
   ERROR_SOURCE_NOT_FOUND = (-4, "clone source could not be found")
   ERROR_LOADER_KILLED = (-3, "loader killed during transfer")