chesterpolo / mongoose

Automatically exported from code.google.com/p/mongoose
MIT License
0 stars 0 forks source link

not smart about urls containing cgi script #108

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. set up mongoose + php cgi
2. create a info.php containing e.g <?php phpinfo(); ?>
3. go to http://localhost:8080/info.php and see expected output
4. go to http://localhost:8080/info.php/foo and be granted with error 404

What is the expected output?

execution of php script with server env vars set as follow:
REQUEST_URI=/info.php/foo
SCRIPT_NAME=/info.php
PATH_INFO=/foo
PHP_SELF=/info.php/foo

What do you see instead?

Error 404: Not Found
File not found

What version of the product are you using? On what operating system?
mongoose-2.8

Please provide any additional information below.

mongoose should look for cgi script existence in the request not only at
the end but up inside too. this allows for e.g cakephp to use semi-pretty
urls without mod-rewrite.

this should fix another bug by preventing http://localhost:8080/info.php/
to show source contents, instead running the script.

for non-cgi files, the current behavior should be kept.

Original issue reported on code.google.com by loic.nageleisen@gmail.com on 3 Dec 2009 at 10:54

GoogleCodeExporter commented 9 years ago
This issue blocks using mongoose as a lightweight web host for a collection of 
fossil (see www.fossil-scm.org) code repositories. (Fossil can self-host any 
single repository, but is much happier if used from a "real" web server via CGI 
to handle a collection of repositories and related shipments.) The extra path 
info has been a part of the CGI specification since before it was a 
specification, although it might well be only lightly used today.

One complication is that mongoose allows CGI programs to be located anywhere in 
the document root, rather than in a specific cgi-bin folder. This does increase 
the complexity of the path parser required to correctly separate the path of 
the CGI from its extra path information.

There is also the question of how an URI like http://localhost:8080/a.cgi/b.cgi 
should be treated. I believe that should attempt to spawn a.cgi, with /b.cgi as 
the extra path information, and should fail if a.cgi itself does not exist.

Mongoose is clearly a good choice for my needs (aside from this issue) as it is 
small, fast, and was easily cross-compiled to run on my D-Link DNS-323 NAS (an 
ARM core from Marvell running linux).

Original comment by RBert...@gmail.com on 9 Jun 2010 at 11:28

GoogleCodeExporter commented 9 years ago

Original comment by valenok on 7 Sep 2010 at 7:37

GoogleCodeExporter commented 9 years ago
I'm running into this issue setting up a git http-backend server.
Expected url format:

 http://localhost:8080/gitweb/git.cgi/repository.git

Original comment by bdwong....@gmail.com on 7 Jun 2011 at 3:11

GoogleCodeExporter commented 9 years ago

Original comment by valenok on 21 Jun 2011 at 9:35

GoogleCodeExporter commented 9 years ago
This issue is Accepted and has Priority-High and yet there are no changes for 
the past 6-7 months. Any news?

Original comment by i...@thefrenkels.net on 15 Feb 2012 at 1:06

GoogleCodeExporter commented 9 years ago
This is also an issue for using php frameworks like Symfony and I guess for 
many other projects too. Thank you very much for your efforts!

Original comment by tilo.fre...@gmail.com on 16 Feb 2012 at 3:03

GoogleCodeExporter commented 9 years ago
Please sync up to the latest code, PATH_INFO support has been added.

Original comment by valenok on 4 Mar 2012 at 5:15

GoogleCodeExporter commented 9 years ago
I can confirm that the git use case works now. I can clone, push and 
pull repositories. Thanks!

Original comment by bdwong....@gmail.com on 25 Apr 2012 at 4:03

GoogleCodeExporter commented 9 years ago
Confirmed as working, closing this.

Original comment by valenok on 22 Sep 2012 at 2:22