diff options
author | bptato <nincsnevem662@gmail.com> | 2023-09-30 02:51:13 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-09-30 03:07:15 +0200 |
commit | 8048a943706ee32f5970e461dda0a01aeb55c27f (patch) | |
tree | a9456532629274491e7ccfdc0b7773da247e58a1 /src/loader/connecterror.nim | |
parent | ef8124638b6b056a4721918b47fc00a349ab0da1 (diff) | |
download | chawan-8048a943706ee32f5970e461dda0a01aeb55c27f.tar.gz |
loader: add local-cgi
Add w3m-style local CGI support. It is not quite as powerful as w3m's local CGI, because it lacks an equivalent to W3m-control. Not sure if it's worth adding; we certainly shouldn't allow passing JS in headers, but a custom language for headers does not sound like a great idea either... eh, idk. also, TODO add multipart
Diffstat (limited to 'src/loader/connecterror.nim')
-rw-r--r-- | src/loader/connecterror.nim | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/loader/connecterror.nim b/src/loader/connecterror.nim index 5fce5287..f10285d2 100644 --- a/src/loader/connecterror.nim +++ b/src/loader/connecterror.nim @@ -1,13 +1,17 @@ import bindings/curl type ConnectErrorCode* = enum + ERROR_CGI_FILE_NOT_FOUND = (-12, "CGI file not found") + ERROR_INVALID_CGI_PATH = (-11, "invalid CGI path") + 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_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"), - ERROR_DISALLOWED_URL = (-2, "url not allowed by filter"), + ERROR_SOURCE_NOT_FOUND = (-4, "clone source could not be found") + ERROR_LOADER_KILLED = (-3, "loader killed during transfer") + ERROR_DISALLOWED_URL = (-2, "url not allowed by filter") ERROR_UNKNOWN_SCHEME = (-1, "unknown scheme") converter toInt*(code: ConnectErrorCode): int = |