Commit 34711e560447c955a2a4bdd2fd04178bf7099e0c
1 parent
8adc07df
Adding some error codes
Showing
2 changed files
with
11 additions
and
4 deletions
Show diff stats
calexium_lib/CXM_errors.anubis
| @@ -16,7 +16,9 @@ public type GeneralError: | @@ -16,7 +16,9 @@ public type GeneralError: | ||
| 16 | no_init, | 16 | no_init, |
| 17 | unknown_command, | 17 | unknown_command, |
| 18 | wrong_authentification, // Wrong login or password | 18 | wrong_authentification, // Wrong login or password |
| 19 | - access_denied. // login ok but no suffisiant right to access to this area. Can be use with wrong authentification too... | 19 | + access_denied, // login ok but no suffisiant right to access to this area. Can be use with wrong authentification too... |
| 20 | + io_error, // general error on reading or writing from/to IO (file, socket, etc...) | ||
| 21 | + cant_start_process. // A execute to an external process has failed | ||
| 20 | 22 | ||
| 21 | public define Int32 | 23 | public define Int32 |
| 22 | to_Int32 | 24 | to_Int32 |
| @@ -34,4 +36,6 @@ public define Int32 | @@ -34,4 +36,6 @@ public define Int32 | ||
| 34 | unknown_command then 0x5, | 36 | unknown_command then 0x5, |
| 35 | wrong_authentification then 0x6, | 37 | wrong_authentification then 0x6, |
| 36 | access_denied then 0x7, | 38 | access_denied then 0x7, |
| 39 | + io_error then 0x8, | ||
| 40 | + cant_start_process then 0x9, | ||
| 37 | }. | 41 | }. |
calexium_lib/web/CXM_multihost_http_server.anubis
| @@ -2928,9 +2928,12 @@ define Maybe((String,Web_Site_Description)) | @@ -2928,9 +2928,12 @@ define Maybe((String,Web_Site_Description)) | ||
| 2928 | //here we treat the case with only one site. hence we accept any host request | 2928 | //here we treat the case with only one site. hence we accept any host request |
| 2929 | //print("*** there is " +length(sites) + " sites \n"); | 2929 | //print("*** there is " +length(sites) + " sites \n"); |
| 2930 | if length(sites) = 1 then | 2930 | if length(sites) = 1 then |
| 2931 | - with site = force_nth(0, sites), | ||
| 2932 | - //print("ONE server OK\n"); | ||
| 2933 | - success((requested_host, site)) | 2931 | + //with site = force_nth(0, sites), |
| 2932 | + if sites is | ||
| 2933 | + { | ||
| 2934 | + [] then get_site(requested_host,sites), | ||
| 2935 | + [site . t] then success((requested_host, site)) | ||
| 2936 | + } | ||
| 2934 | else | 2937 | else |
| 2935 | get_site(requested_host,sites) | 2938 | get_site(requested_host,sites) |
| 2936 | }. | 2939 | }. |