| Anonymous | Login | Signup for a new account | 11-10-2008 11:10 PST |
| Main | My View | View Issues | Change Log | Docs |
| Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
| ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
| 0001184 | [BusyBox] Networking Support | major | always | 01-29-07 06:54 | 03-05-07 08:56 | ||||
| Reporter | aschultz | View Status | public | ||||||
| Assigned To | BusyBox | ||||||||
| Priority | normal | Resolution | fixed | ||||||
| Status | closed | Product Version | 1.4.x | ||||||
| Summary | 0001184: httpd cgi implementation broken by cset 17196 | ||||||||
| Description |
cset 17196 contains this beauty (slightly edited to highlight my point): - if (strncmp(rbuf, "HTTP/1.0 200 OK\r\n", 4) != 0) { - /* there is no "HTTP", do it ourself */ - full_write(s, "HTTP/1.0 200 OK\r\n", 17); - } /* hmm, maybe 'else if'? */ - if (!strstr(rbuf, "ontent-")) { - full_write(s, "Content-type: text/plain\r\n\r\n", 28); - } - firstLine = 0; +#define HTTP_200 "HTTP/1.0 200 OK\r\n\r\n" + if (memcmp(rbuf, HTTP_200, 4) != 0) { + /* there is no "HTTP", do it ourself */ + full_write(s, HTTP_200, sizeof(HTTP_200)-1); + } +#undef HTTP_200 This breaks cgi scripts that omit to send a HTTP/1.0 header but continue to send other headers. The fix is simple, change the #define HTTP_200 to: #define HTTP_200 "HTTP/1.0 200 OK\r\n" |
||||||||
| Additional Information | |||||||||
| Attached Files | |||||||||
|
|
|||||||||
| Copyright © 2000 - 2006 Mantis Group |