W3C home > Mailing lists > Public > www-jigsaw@w3.org > September to October 1996

Re: Runaway CgiResource Problem

From: Bruce Nelson <bnelson@www.css.filenet.com>
Date: Thu, 10 Oct 1996 14:39:06 +0000
Message-Id: <9610102138.AA22434@www.css.filenet.com>
To: www-jigsaw@w3.org
I got it to work!

It seems that one the the shared libs I use with perl 5 were not 
behaving well -- causing java - not Jigsaw to fail.

Thanks to Anselm for the help!


> Bruce Nelson writes:
>  > The plot thickens...
>  > 
>  > It seems that the runaway is tied to how the CgiResource is set
>  > up... if for example my interpreter is set to /usr/local/bin/perl
>  > and my command is /usr/local/Jigsaw/Jigsaw/WWW/test.pl, (the script
>  > is as follows) 
>  > ---
>  > 
>  >   #!/usr/local/bin/perl
>  > 
>  >   print "Content-Type: text/html\n\n";
>  >   print "Hello cruel World";
>  >   exit(0);
>  > 
>  > ---
>  > I get some very intresting results depending on the value of 
>  > "generates-form".
> 
> Let me clarify what generates-form is for (BTW if you had 1.0alpha3,
> you would have context sensitive help ;-) 
> If true, it means that the script, when GET (no query string) wants to
> generate the form, so the script is called, no parameters to generate
> it. If set to false, the the CgiResource defaults to its superclass
> FileResource, and act as as such.
> For compatibility, generates-form defaults to true.
> 
>  > 
>  > if "generates-form" = true I get the runaway script problem as described 
>  > below.
> 
> You should say:
>     
>     print "Content-Type: text/html\r\n";
> 
> I am unsure if that causes the problem, but its worth a try. Also you
> may want to try running Jigsaw in trace mode (by adding -trace to your
> command line), this will dump all requests/replies.
> 
>  > if "generates-form" = false and content-type = text/html then a C application
>  > works fine - no runaway but if I use the interpreter set to 
>  > /usr/local/bin/perl and I set the command to test.pl I get the contents of my
>  > script instead of its output, example:
>  > 
>  >   #!/usr/local/bin/perl
>  > 
>  >   print "Content-Type: text/html\n\n";   
>  >   print "Hello cruel World";
>  >   exit(0);
>  > 
>  > instead of Hello cruel World. very strange -- 
> I hope the above explanation on generates-form has revealed the
> mistery: here, the Cgiresource defaults to FileResource, because you
> issue a GET with no query string, and the FileResource emits the
> content of the script (it thinks it is the file to serve, because the
> filename attribute is undefined)
> 
> Anselm.
> 
-------------------------------------------------
Bruce Nelson
Webmaster - FileNet Corporation
bnelson@css.filenet.com
Received on Thursday, 10 October 1996 17:46:49 GMT

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