--- parser3/src/main/pa_request.C 2026/09/30 16:44:20 1.454 +++ parser3/src/main/pa_request.C 2026/10/02 15:49:42 1.457 @@ -35,7 +35,7 @@ #include "pa_vdate.h" #include "pa_varray.h" -volatile const char * IDENT_PA_REQUEST_C="$Id: pa_request.C,v 1.454 2026/09/30 16:44:20 moko Exp $" IDENT_PA_REQUEST_H IDENT_PA_REQUEST_CHARSETS_H IDENT_PA_REQUEST_INFO_H IDENT_PA_VCONSOLE_H; +volatile const char * IDENT_PA_REQUEST_C="$Id: pa_request.C,v 1.457 2026/10/02 15:49:42 moko Exp $" IDENT_PA_REQUEST_H IDENT_PA_REQUEST_CHARSETS_H IDENT_PA_REQUEST_INFO_H IDENT_PA_VCONSOLE_H; // consts @@ -618,7 +618,7 @@ void Request::use_file_directly(const St const char* after=target; size_t drlen=strlen(request_info.document_root_path); - if(memcmp(after, request_info.document_root_path, drlen)==0) + if(path_cmp(after, request_info.document_root_path, drlen)==0) after+=drlen; // to start from document_root/auto.p while(const char* before=strchr(after, '/')) { @@ -753,7 +753,11 @@ const String& Request::full_disk_path(co return relative_name; // an allowed uri is passed through if(const String* path=file_uri_to_path(relative_name)) return backslashes_to_slashes(*path); +#ifdef WIN32 + throw Exception(PARSER_RUNTIME, &relative_name, "must be file:///path, file://localhost/path or file://server/share/path"); +#else throw Exception(PARSER_RUNTIME, &relative_name, "must be file:///path or file://localhost/path"); +#endif } // before '\' becomes '/', to avoid mixing the UNC path \\server with web path //server if(is_os_absolute_path(relative_name)) @@ -773,7 +777,7 @@ const String* Request::real_disk_path(co switch(path_scheme(name)) { case PA_SCHEME_NONE: return &full_disk_path(name); case PA_SCHEME_FILE: { - const String* path=file_uri_to_path(name); + const String* path=clean_path_scheme(PA_SCHEME_FILE, name) ? file_uri_to_path(name) : 0; return path ? &backslashes_to_slashes(*path) : 0; } default: return 0; // not a disk path