joswa / mongoose

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

On windows, shebang line does not work in CGI scripts #243

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
On windows, in the function spawn_process, when the cgi script is searched for 
the interpreter line, the local variable cmdline is used uninitialized, so the 
fopen always fails:

// If CGI file is a script, try to read the interpreter line
  interp = conn->ctx->config[CGI_INTERPRETER];
  if (interp == NULL) {
    buf[2] = '\0';
    if ((fp = fopen(cmdline, "r")) != NULL) {
...

Original issue reported on code.google.com by federico...@gmail.com on 28 Mar 2011 at 1:22

GoogleCodeExporter commented 9 years ago
Submitted 
https://code.google.com/p/mongoose/source/detail?r=0f0b8d130a85ddb0d08a8990b55aa
afcb7dd76c2, thanks.
Not tested (no Windows currently available), could you verify that the fix is 
valid, please?

Original comment by valenok on 22 Jun 2011 at 11:08

GoogleCodeExporter commented 9 years ago
Now it works!

Original comment by federico...@gmail.com on 23 Jun 2011 at 9:40

GoogleCodeExporter commented 9 years ago
Awesome, thank you.

Original comment by valenok on 23 Jun 2011 at 9:41