chesterpolo / mongoose

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

cgi_ext examples lack dot needed for sane matching (AKA cgi_ext matches any end-of-filename string) #117

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create "foo.txt" with some text in it.
2. Configure Mongoose with cgi_ext set to "xt".
3. Access foo.txt via Mongoose.

What is the expected output? What do you see instead?
Expected: The contents of foo.txt.
Actual: CGI execution of foo.txt (probably with a 500 error).

What version of the product are you using? On what operating system?
2.8 on Windows 7 Ultimate 64bit

Please provide any additional information below.

There's two ways to look at this problem:
 - Mongoose should add a leading dot before the cgi_ext value itself, 
so "cgi_ext xt" would look for ".xt" at the end of the filename instead of 
just "xt".
 - Mongoose's example configuration should have a leading dot on each 
cgi_ext item, thus avoiding (and continuing to allow) the unexpected 
matching shown above.

Original issue reported on code.google.com by james.g....@gmail.com on 31 Jan 2010 at 11:01

GoogleCodeExporter commented 9 years ago

Original comment by valenok on 24 Feb 2010 at 9:24

GoogleCodeExporter commented 9 years ago
Mongoose config now has leading dots for the default extensions.
However, I don't think it is a good idea to force leading dots for 
user-specified setting. If user wants to match by any file suffix, it should be 
able to.

Original comment by valenok on 20 Sep 2010 at 9:51