From: Sergei G. <sgo...@gm...> - 2011-02-13 21:42:20
|
Hi! Looks like tilde URLs (/~username/whatever) can't be passed to appmods even if the tilde itself doesn't expand (in this case the tilde URL always returns 404). Adding the following guard "fixes" it: --- yaws-1.89.orig/src/yaws_server.erl +++ yaws-1.89/src/yaws_server.erl @@ -3747,7 +3747,7 @@ _ -> maybe_return_dir(ArgDocroot, GetPath, VirtualDir) end; - [$/, $~ |Tail] -> + [$/, $~ |Tail] when ?sc_has_tilde_expand(SC) -> ret_user_dir(Tail); _ -> FullPath = construct_fullpath(ArgDocroot, GetPath, VirtualDir), So, if this change is acceptable I'd like to see it in the YAWS trunk. Or it's absolutely necessary to forbid tilde URLs if the tilde doesn't expand? Cheers! -- Sergei Golovan |