ufairiya / mongoose

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

Patch: relative path to cgi #178

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Suppose the following Windows directory structure:
C:\mongoose\mongoose.exe
C:\mongoose\mongoose.conf ("document_root .")
C:\mongoose\compiledcgi.cgi
http://127.0.0.1/compiledcgi.cgi works as expected.

2. Now change cgi module placement
C:\mongoose\mongoose.exe
C:\mongoose\mongoose.conf ("document_root .")
C:\mongoose\cgibin\compiledcgi.cgi
http://127.0.0.1/cgibin/compiledcgi.cgi does not work. You get no 404 error, 
just empty output (blank page).

3. Now change document_root
C:\mongoose\mongoose.exe
C:\mongoose\mongoose.conf ("document_root ./cgi-bin")
C:\mongoose\cgibin\compiledcgi.cgi
http://127.0.0.1/compiledcgi.cgi does not work either. Again no 404 error, just 
empty output.

What version of the product are you using? On what operating system?
hg rev 107:913053c07b3c on Windows

Please provide any additional information below.
This issue is about path to cgi module and is simpler case of issue 136
(http://code.google.com/p/mongoose/issues/detail?id=136). Currently no path is 
used when lauching cgi on Windows, just plain file name. Once cgi module is out 
of mongoose.exe working directory it does not work.

Resolving this issue is possible by adding relative path to cgi file name (see 
attached patch).

Resolving issue 136 would require adding absolute path to cgi file name. This 
absolute path must be obtained somehow, maybe through argv[0], but I don't know 
how reliable it is.

Original issue reported on code.google.com by vvzh.dev@gmail.com on 20 Sep 2010 at 5:21

Attachments:

GoogleCodeExporter commented 9 years ago
Submitted 
http://code.google.com/p/mongoose/source/detail?r=2c5c758066650f46356091bdebe136
09920b9208

Please verify.
Thanks!

Original comment by valenok on 20 Sep 2010 at 6:24

GoogleCodeExporter commented 9 years ago
Issue 136 has been merged into this issue.

Original comment by valenok on 20 Sep 2010 at 6:25