W3C home > Mailing lists > Public > www-jigsaw@w3.org > July to August 1997

VirtualHost and duplicate URL: again and again

From: RaphaŽl MARTIN <rmartin@iri.upc.es>
Date: Wed, 23 Jul 1997 20:22:35 +0200
Message-ID: <01BC97A6.2D2E0FD0@ragmaninov.upc.es>
To: "'Jigsaw Mailing List'" <www-jigsaw@w3.org>
Hi...

Guess who is writting this mail !!!

Well, Well Well... I have good news and bad news... Due to the fact that I didn't have many answer to my questions, I supposed that no-one use VH (out of general Standard protocol HTTP1.0)...or no one have the same problem ... Do I have a strange phenomenon in code for my VH version???

Don't worry about it... I have isolated the source of the problem....

Firstly, using Editors and Config tools with a root resource which is a VirtualHost is possible !!! Yes, I ve done it !!!
The bug comes from that the General Properties resources, when it modify the file /config/http-server.props, it does it wrong...
it changes the w3c.jigsaw.root.name from 'root' to 'VH', but it does not change the w3c.jigsaw.edit.root. If you change it for 'VH'... the the configuration tools works fine !!! And only you see the VH resources and not yours old 'root' resources... 

Then one part of the my problem is solved... (A lot of time for a little thing !!!)

The second part of the problem is due to the fact that VH is not supported by the method getURLPath() of HTTPResource class... In fact, when you create the different server site in the VH using PassDirectory, all sub -resources of sites are 'standard' resources (Directory resources or files resources, etc...)
To built an index of a directory, Jigsaw use the DirectoryResource.getDirectoryListing() methods...

This methods constructs the reply calling the getURLPath() of each resource stored in the DirectoryResource (Container Store)... But the string  returned by getURLPath is a relative URL

For instance... You have 2 sites called http://site1 and http://site2 
In each one you have a Directory with files
http://site1/Dir1/File1,File2,File2....
Of course you have made a VH...

The how is stored the File1 ???
Normally its url is http://site1/dir1/file1
That s what you must have in your index of the dir...

But in fact, the getURLPath, and the store resource see the file as
/site1/dir1/file1, due to the VH configuration and Pass Directories...

So when you built the index, the problem appears, because / is replaced by
http://site1...

Then your final url is http://site1/site1/dir1/file1... Bouah !!!

So to conlude, I have two questions :
	Did I misconfigure my server ?
	If not, there is a little but in getURLPath()... 
	A simple way to solve it is to turn relatives URLS in Absolute url's (adding only http:/) ... But this operation must be performed only in VH case, because in standard site, it generates a bug... So how could it be done ???

I think that all for the moment !!!

Sorry for the length of this mail !!!

RAF
Received on Wednesday, 23 July 1997 14:28:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:26 GMT