Hi, I fixed this bug 6 months ago. There's a patch on SourceForge:
"Invalid response status logged for custom redirects" http://sourceforge.net/tracker/?func=detail&aid=1013752&group_id=3152&atid=103152 You may also be interested in this related patch which alows a custom redirect handler to know the original URL as sent by the browser and act accordingly: "ns_conn seturl newUrl" http://sourceforge.net/tracker/?func=detail&aid=1013672&group_id=3152&atid=353152 On Fri, 11 Feb 2005 09:02:42 -0500, Dossy Shiobara <[EMAIL PROTECTED]> wrote: > Hi, > > AOLserver has "internal redirects" that allow overriding of some > (currently not all, strangely) responses based on the HTTP status code. > The configuration section looks like this (from the Annotated Config. > Reference): > > # > # Internal redirects > # > ns_section "ns/server/${servername}/redirects" > ns_param 404 "/notfound.html" ;# Not Found error page > ns_param 500 "/servererror.html" ;# Server Error page > > I have two proposed changes: > > 1) Allow overriding of all response codes. This may not actually be a > good idea, but it just seems odd that only certain response codes > have their own C API which uses the internal redirect mechanism. > > 2) The current internal redirect mechanism changes the URL in the > request then re-executes it. The downside of the current > implementation is that a custom error handler for 500 Server Error, > if it's defined and exists and is served, turns the request into a > 200 OK. The HTTP response becomes a 200 OK instead of the original > 500 Server Error with the custom HTTP response body. nslog also logs > a 200 OK in the access log, instead of the 500. This just feels > wrong to me. If you have a custom 404 page, you can't use the access > log to report on the number of 404's any more since the log will show > 200's for the 404 requests. > > I'm still on the fence whether #1 is a good idea or not. In principle > it's the right thing to do, but implementing it properly will require a > lot of refactoring of nsd/return.c to make it clean, and even then > there could be problems. > > I'm definitely in favor of making the chnage described in #2, however > it's a functionality change that will invalidate people's assumptions > who use internal redirects and I don't know what effect that will have > on people's applications, especially logfile analyzers, etc. I'm keen > on implementing this change for 4.1.0, but what I really want to know is > do people think it's okay to backport this change to 4.0.x? I really > want to, but if everyone else thinks it's a bad idea ... then I can > leave it as a 4.1.0-only change. > > Thoughts? Problems? > > -- Dossy -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.