On Sun, 24 Dec 2000, Mathew Ryden wrote:
> > Minor comments. The delimiter should be = instead of " ". Also, no need
> > for the special use of ":".
> >
> > So you go to KSK@blah, which has the field MapFile=test.map in the
> > metadata. FProxy notices this and processes keys like
> > blah/images/duck.gif, etc. Relative paths works just as well with SSKs.
>
> Whoa. hold up there now. When did we decide that we are going to assume that
> KSKs didn't have slashes?
>
> Slight problem, that. :)
Yeah. I'm looking at this from the perspective of what FProxy needs to
know to retrieve a mapped file: (a) the location of the map file, and (b)
the absolute path of the file to look up in the map file. If you neatly
divide the URI into "MAPFILE:FILENAME" you can trivially request the map
file and look up the filename. It's flexible and it's really easy to
implement.
Your "put the location of the map file in the metadata" solution is
flawed, because we are not assured that browser is thinking about the same
directory structure as we are.
For example, FProxy looks up KSK@blah's CHK in the metafile, and finds
that its filename is "/chapter_01/misc/rabbit.html". The browser doesn't
know this -- it sees the URI "http://localhost:8081/KSK@blah", and assumes
that a relative link off KSK@blah to "image.gif" means
"http://localhost:8081/image.gif", because it has no idea about a map
file. So we would need to keep track of the state of our session -- what
directory we're in -- with cookies. And what about a relative link to
"../index.html"? It's nuts.
Now, let's examine what happens when the user requests data within my
system. There would be no shortcut to confuse the browser -- he would have
to specify the complete path of the file. His browser would see the URI as
"http://localhost:[EMAIL PROTECTED]:/chapter_01/misc/rabbit.html". FProxy
immediately knows that the map file is under [EMAIL PROTECTED], and the
filename to look up is "/chapter_01/misc/rabbit.html". Relative links
work just as they do with SSKs, because the path in the browser is
guaranteed to be the true path of the file.
Besides, is "freenet:pigdogjournal:/index.html" really that ugly?
--
Mark Roberts
[EMAIL PROTECTED]
_______________________________________________
Freenet-dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/freenet-dev