Alvaro Lopez Ortega wrote:
Eric S. Johansson wrote:

 > http://www.0x50.org/?option=com_docu&topic=Common_behavior
 >
 > Directory /download {
 >    Handler common {
 >        HeaderFile /var/www/README
 >        Interpreter /usr/bin/php5-cgi
 >    }
 > }

  This example is wrong; it doesn't make any sense to include the
  Interpreter directive in there.  The common handler will use either
  the handler file or the dirlist one, and neither of them use that
  parameter.

that explains why I was not able to find a handler in the code.  :-)

  I have fixed it on the wiki :-)

actually it does make sense.  I'll try to explain below.

 > this is almost the kind of behavior I've been looking for. What I would
 > like to do instead is substitute script alias for interpreter and invoke
 > the script alias if the referenced file doesn't exist.

  I'm not sure about what you want to do, but it seems like you should
  move some of that logic to server script rather than trying to relay
  the work on the server :-m

that is one interpretation and one I had been trying to follow. The problem is that I'm taking everything below http://foo.com/ and using a CGI program to render the content the user will see. The first problem comes when trying to handle simple things like cascading style sheets. the CGI program gains control and the stylesheet is never seen. The second problem comes when you return different types of files. I need to replicate in my CGI program the file type to mime type association if I'm going to return files via the web server. The third problem is performance. Why should my CGI return files when the web server can do it much more quickly and efficiently?

Yes I could do it. Yes it's probably not a bad thing because it would make my CGI web server independent. But somehow, doing something the web server does better just strikes me as wrong.

There are many circumstances where it makes sense to do something if the URL does not resolve to a file or directory. Redirection's for instance. If you have a file or series of files in a directory under the point of redirection, those files would become invisible.

the need to do this is an artifact of the CGI environment. CGI is not a position to tell the web server what to do. maybe on the other hand, I should be looking at making my own module. One which embeds Python and implements the logic I want.

If you advised that I really should stick with everything inside the CGI, I will do so. It won't be terribly difficult for the simple parts if I can figure out how to set the appropriate mime type.

---eric


_______________________________________________
Cherokee mailing list
[email protected]
http://www.alobbs.com/cgi-bin/mailman/listinfo/cherokee

Reply via email to