[Prev][Next][Index][Thread]

HTSimplify Question



We're still running wwwlib 3.1, but this would seem to be a basic question
regarding what HTSimplify is doing.

Given a page www.someplace.com and an IMG entry ../images/mygif.gif, putting
them together as http://www.someplace.com/../images/mygif.gif and calling
HTSimplify gives the same thing back as what goes in. In this particular
instance, I happen to know the correct url is
www.someplace.com/images/mygif.gif, and the server is sending back a 404 on
doing a HEAD or GET when sending over the url with the .. in it.

I've read over the relative URL RFC, and it talks about what to do when you
get something of the form www.someplace.com/a/b/../../c.gif (I believe
simplify it to /a/../c.gif, though I'm at home and doing this from memory),
but it doesn't seem to indicate in my reading what to do when you don't have
some leading subdirectories to work with from the beginning. (As an aside, I
don't believe HTSimplify would return /a/../c.gif anyway.)

What is the correct behavior in attempting to simplify this URL? Do I
arbitrarily pull the .. off the front because I know it's not possible to
climb above the root of the document root? Is the server actually in error
in this case?

        John

---------------------------------------------------------------
John James                    Email:  jjames@firstfloor.COM
First Floor, Inc.             Web:    http://www.firstfloor.COM
444 Castro Street, Suite 200  Tel:    (415) 254-5101
Mountain View. CA 94041       Fax:    (415) 968-1193