- From: Remy AMOUROUX <Remy.Amouroux@imag.fr>
- Date: Fri, 9 Aug 1996 15:25:54 +0200
- To: www-jigsaw@w3.org
Hello >>>>> "AB" == Anselm Baird-Smith <abaird@w3.org> writes: AB> I have been working on the CgiResource, preparing it for the next AB> release. I know lots of people had trouble with it. Maybe I come a bit late, but here is one exemple of trouble. Doing some experiences with jigsaw, I tried to use the CgiResource to access a database through the CGI given by the vendor. The archive of the mailing-list gave me the hints to do so and the creation of a CgiResource for the well-known test-cgi shell script has been done without any problem. I made the same with the database access cgi program. But I met a problem which I was not able to solve. I illustrate the problem with test-cgi : 1) Using the following url, with an http server like apache, http://mysite/cgi-bin/test-cgi/truc/muche the test-cgi is executed and you will have PATH_INFO = /truc/muche The same url used with the jigsaw server gives : <h1>Document not found<h1> Document /cgi-bin/test-cgi/truc/muche not found on this server So, the script is _never executed_ on a jigsaw server. Maybe, I'm doing something wrong but I don't know what ! The problem doesn't come from the CgiResource, I think the code of the class is never called in this case. I tried to define a resource named /cgi-bin/test-cgi/truc/muche, but it's not possible using the Editor interface. Surely because my CgiResource test-cgi is a FileResource and not a DirectoryResource. 2) The previous problem made me look at the output of the test-cgi script : when you request http://mysite/cgi-bin/test-cgi to the jigsaw server, you have : PATH_INFO = /cgi-bin/test-cgi But doing the same with another server (apache for exemple), you will have : PATH_INFO = / I had a look at the CgiResource code, the value of PATH_INFO is set with a call to request.getURI(). It's a small thing but we all have to deal with legacy application and I think the problem will arise very often. the CGI/1.1 interface specification gives the following definition : "PATH_INFO=The extra path information, as given by the client. In other words, scripts can be accessed by their virtual pathname, followed by extra information at the end of this path. The extra information is sent as PATH_INFO. This information should be decoded by the server if it comes from a URL before it is passed to the CGI script" So, is it choice in the jigsaw design to disallow this feature ? AB> The most visible improvment I did to this resource, is to default AB> command[0] (the script path), to the resource path, which means that AB> you can now use the resource indexer, to declare all ".pl" files to be AB> exported by a CgiResource. A good idea. Rémy
Received on Friday, 9 August 1996 09:31:09 UTC