I have the webserver mainly working now, though the following conundrum may force me to change it again.
The webserver takes GET requests like /std/array.flx std/array.flx and tries to load as written, if that fails searches for it in the FLX_PATH. There's some fun with my new feature: include "./child.flx" because the browser thinks it is smart, and replaces the . with the current file's directory, so I have to add an extra / in the anchor href. Now the problem is directories. If I make the href dirname/filename I get a GET with the orginal page minus the basename plus dirname/filename but without a leading / so the browser shows: http://localhost:1234/dir/dir/dir/file.ext and the request comes in as a relative file name which implies a path search. I need a leading / so I try to put href=/dirpath/file.ext expecting to get: http://localhost:1234//dir/dir/dir/file.ext but no, what I *actually* get with firefox is: http://dir/dir/dir/file.ext which of course fails :) No, I don't want to process % stuff :) I can't see any workaround other than to resolve filenames when generating the pages, instead of on the request. I have to note, this only works where the webserver KNOWS it has to do the resolution. The problem is stuff in documentation looking like: See also <a href=std/int.flx>std.int</a> for more info on integers. That has to do a search because I don't actually know where the file is. Also .. I don't actually know HOW to present the resolved names. I'm actually thinking of something like: /$FLX_PATH/std/std.int /$ROOT/dir/name/from/filesystem/root so all the requests look like: http://localhost:1234//$ROOT/.... and then I can use the $NAME to figure out how to find the file. It's a bit weird: I can put http://localhost:1234//Users/johnskaller/felix/src/ into the search box of the browser but I can't encode that name in a href :) -- john skaller skal...@users.sourceforge.net ------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language