diff --git a/web/multihost_http_server.anubis b/web/multihost_http_server.anubis index 6d67599..78eb5e3 100644 --- a/web/multihost_http_server.anubis +++ b/web/multihost_http_server.anubis @@ -1571,20 +1571,30 @@ define Result(Error,String) define (String,String) - separate_uri_from_query_string - ( - String uri_and_query_string, - Int n - ) = - if nth(n,uri_and_query_string) is - { - failure then (uri_and_query_string,""), - success(c) then - if c = '?' - then (substr(uri_and_query_string,0,n), - substr(uri_and_query_string,n+1,length(uri_and_query_string)-(n+1))) - else separate_uri_from_query_string(uri_and_query_string,n+1) - }. + separate_uri_from_query_string + ( + String uri_and_query_string, + ) = + if find_string(uri_and_query_string, "?", 0) is + { + failure then (uri_and_query_string,""), + success(pos) then (substr(uri_and_query_string, 0, pos), + substr(uri_and_query_string, pos+1, length(uri_and_query_string)-(pos+1))) + } +. + +// if nth(n, uri_and_query_string) is +// { +// failure then (uri_and_query_string,""), +// success(c) then +// if c = '?' +// then (substr(uri_and_query_string,0,n), +// substr(uri_and_query_string,n+1,length(uri_and_query_string)-(n+1))) +// else separate_uri_from_query_string(uri_and_query_string,n+1) +// } +//. + + @@ -1742,8 +1752,8 @@ public define Result(Error, HTTP_Request_Line) error(msg) then error(msg), ok(_) then - if separate_uri_from_query_string(uri_and_query_string,0) is - (uri,query_string) then + if separate_uri_from_query_string(uri_and_query_string) is + (uri, query_string) then if identify_get_or_post(method) is { error(msg) then error(msg), -- libgit2 0.21.4