Re: [cgiwrap-users] cgiwrap and 404 error
Brought to you by:
nneul
From: Tobia C. <tob...@re...> - 2008-02-01 16:46:06
|
Dear Jeremy, Cgiwrap has the control, apache only response 500 if cgiwrap explode whithout http code output The cgiwrap print to browser directly the http code ...printf("HTTP/1.0 200 Ok\n") ... in output on msg.c file.... void MSG_ContentType(char *typestring) { static int printed = 0; if ( !printed ) { printed = 1; if ( MSG_Need_NPH_Header ) { printf("HTTP/1.0 200 Ok\n"); } printf("Content-type: %s\n\n", typestring); } } I think that the perfect solutions was to add configure params like --passthru-httpcode that enable cgiwrap to return various http code to browser directly, with a simple or configurable output text. Jeremy Chadwick ha scritto: >> I think that the other way is to make patch on cgiwrap for return http >> 404 response code on not file/dir exists. >> > > This is not as easy as you make it sound. I urge you to go look at the > source yourself and see where you can find any HTTP status codes being > output -- there are none. Based on what I see in the code, Apache is > what's deciding what HTTP status code to use, not cgiwrap. > > I'm still in the process of trying to figure out how Apache discerns > when to send back an HTTP 500 (for scripts which don't parse right) vs. > an HTTP 200 (for both success as well as file-not-found). cgiwrap's > exit code would be a good guess, but that doesn't appear to be it > either. > > |