chesterpolo / mongoose

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

non-parsed CGI #210

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Passing data to the output from a CGI won't be reflected in the client until 
the CGI dies. (at least in Windows).

Previous issue was created as issue #199, and solved for Unix/Linux (didn't 
have the opportunity to test) by valenok

This simple C CGI:
int main() {
    printf("HTTP/1.1 200 OK\n");
    printf("Content-type: text/html\n\n");
    printf("Test");
    Sleep(5000);
    return 0;
}

Will block the sending until the return 0 (tested from a simple telnet client 
simulating the request by hand).

Original issue reported on code.google.com by abili...@gmail.com on 6 Dec 2010 at 1:27

GoogleCodeExporter commented 9 years ago
I think you need to flush stdout before any timeconsuming work in the cgi, 
otherwise the server might not get the cgi-output before the cgi sleeps.

Original comment by faddiid...@gmail.com on 19 Jan 2011 at 11:41

GoogleCodeExporter commented 9 years ago
Did that, didn't work

Original comment by abili...@gmail.com on 17 Mar 2011 at 8:29

GoogleCodeExporter commented 9 years ago
This is fixed now, please verify.

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