I want to allow users to access my server as www.carnageblender.com
or just carnageblender.com or even with the IP when the dns is being
updated. So, I turn ForceHostP off and life is good.
Except I notice that ns_returnredirect is redirecting to the
cannonical hostname as defined to nssock.
Thus, "ns_returnredirect /index.tcl" yields
GET /redirect.tcl HTTP/1.0
HTTP/1.0 302 Found
...
Location: http://www.carnageblender.com/index.tcl
...
Investigating, Ns_ConnReturnRedirect in nsd/return.c does this for
any location beginning with "/":
if (*url == '/') {
Ns_DStringAppend(&ds, Ns_ConnLocation(conn));
}
Why should this be so? My reading of the
http
1.0 spec indicates that simply leaving "Location: /index.tcl"
would be perfectly correct. Is there any reason I shouldn't remove
this code?