On Fri, 11 Feb 2005 15:20:26 -0500, Dossy Shiobara <[EMAIL PROTECTED]> wrote: > > Can you explain this: > > - connPtr->responseStatus = status; > + /* 200 is default. Don't stomp custom redirects. */ > + if (status != 200) { > + connPtr->responseStatus = status; > + } > > What if the custom redirect isn't found (status = 404) - why should that > stomp the original (say, connPtr->responseStatus == 500)?
Botched config files is something I didn't explore. In practice what happens is 3 consecutive error messages are logged: Error: return: failed to redirect '404': exceeded recursion limit of 3 In which case you should fix your config file :-) But yes, it might be nice to be more explicit here and make sure the correct reponse code is returned until the admin can get to it. I believe Apache handles this. > > 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 > > Why introduce Ns_ConnSetUrl()? Why not change Ns_SetRequestUrl() to do > this? Ns_SetRequestUrl(Ns_Request * request, char *url); Ns_ConnSetUrl(Ns_Conn *conn, char *url); The 'original URL' is a property of the current connection, not a Ns_Request structure which is generic and has no back pointer itself to an Ns_Conn. I thought was cleaner to add the new Ns_ConnSetUrl call, which obviously takes a pointer to the current conn. -- 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.