From: Anders N. <and...@gm...> - 2006-08-29 21:30:58
|
Claes I am not sure if You already saw this from last week. /Anders On 8/21/06, Anders Nygren <and...@gm...> wrote: > On 8/21/06, Claes Wikstr=F6m <kl...@ta...> wrote: > > > > > Hi > > > The 'problem' is that it seems that I can not refer to a file that is > > > under another > > > docroot. > > > For example if I have in $DOCROOT a file header.yaws and in > > > $EXTRA_DOCROOT/somefile.yaws I try to do {yssi, header.yaws} it fails= , with > > > the error mentioned earlier. So I think that yaws only looks in the > > > current "docroot" > > > for the file, and does not search in all of them. > > > > > > And it seems to be the same way with ssi. > > > > > > But maybe its supposed to be that way? > > > > > > > > > Hmm, I'd consider this a bug. It's not suppsed to > > like that it's an unfortunate feature interaction > > between xtra docroots and yssi/ssi > > > > > I looked some more during the weekend and this is what I found. > > 1, ssi, I found that if You give {ssi,Path,....} it treats it as an > relative path. But I found > that it is possible to give {ssi, {abs_path,Path},....} to specify an > absolute path. > I did not find that documented anywhere, so it may be a good idea to > add that to the > documentation,. > > 2, yssi ALWAYS treats the the path as a relative path. > This patch seems to fix that part of the problem, BUT it may be better > to do something like {abs_path, Path} to be consistent with ssi. > > diff ./yaws_server.erl > /home/anders/download/Erlang/yaws-1.64/src/yaws_server.erl > 2150c2150,2157 > < UT2 =3D url_type(lists:flatten(UT#urltype.dir) ++ [$/|Yfile], > ARG#arg.docroot), > --- > > UT2=3Dcase Yfile of > > [$/|_] -> > > url_type( Yfile, ARG#arg.docroot); > > _Else -> > > url_type(lists:flatten(UT#urltype.dir) ++ [$/|Yfile], > > ARG#arg.docroot) > > end, > > > > 3, xtra_docroots, both ssy and yssi only looks in xtra_doocroots that > are listed AFTER > the docroot of the .yaws file that contains the [y]ssi directive. I > dont know how to > fix that. > > /Anders > |