ancruna / mongoose

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

CGI status text ignored #296

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
A CGI program returning a header like "Status: 404 Not Found"

What is the expected output?
The Status text should be reflected in the HTTP response: "HTTP/1.1 404 Not 
Found"

What do you see instead?
"HTTP/1.1 404 OK"

What version of the product are you using? On what operating system?
mongoose-3.0.exe (Windows)

Please provide any additional information below.
The "OK" text is hard-coded in handle_cgi_request:
  status = get_header(&ri, "Status");
  conn->request_info.status_code = status == NULL ? 200 : atoi(status);
  (void) mg_printf(conn, "HTTP/1.1 %d OK\r\n", conn->request_info.status_code);

Original issue reported on code.google.com by richard....@gmail.com on 16 Nov 2011 at 11:37

GoogleCodeExporter commented 9 years ago

Original comment by valenok on 23 Sep 2012 at 12:37