AlixAbbasi / mongoose

Mongoose Embedded HTTP Server
MIT License
0 stars 0 forks source link

Trouble with url_rewrite_pattern and matching file name #334

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
# ls -l
-rw-r--r-- 1 root root   60 Mar 29 19:03 index.html
drwxr-xr-x 2 root root 4096 Mar 29 19:01 mydir

# mongoose -w /index1/=/mydir/

What is the expected output? What do you see instead?
File listing of the directory "mydir" is expected.

If I type <ip_address>:8080/index1, I expect to see the listing within the 
directory "mydir", but rather I get a 404.

What version of the product are you using? On what operating system?
CentOS 6.2 x86_64

Please provide any additional information below.

Original issue reported on code.google.com by shantanu...@gmail.com on 29 Mar 2012 at 1:42

GoogleCodeExporter commented 9 years ago
mongoose -w /index1=mydir

Note that you request /index1, but the rewrite rule is for /index1/.
Mongoose doesn't know that index1 is a directory, thus doesn't send a redirect. 
It tries to find a file called index1/ and fails.

Original comment by valenok on 23 Sep 2012 at 1:03