Bugs item #446689, was opened at 2001-08-01 00:04
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=103152&aid=446689&group_id=3152

Category: API: C
Group: aolserver4_0
Status: Open
Resolution: None
Priority: 5
Submitted By: Jerry Asher (jerryasher)
Assigned to: Nobody/Anonymous (nobody)
Summary: nsreturnredirect isn't RFC2068 compliant

Initial Comment:
This is "broken" in aolserver 4, but is also broken in
the AOLserver 3.x series.

According to RFC 2068, Section 14.30, Location, the
Location field must be an absoluteURI.
ns_returnredirect doesn't ensure this and will
gleefully create and return "relative urls".

So if a page at /foo/bar does something like:

ns_returnredirect index.tcl

(presumably intending that the browser should redirect
to /foo/bar/nextpage.tcl)

What will be returned is:

Location: nextpage.tcl

It turns out that many browsers such as IE and
Netscape understand this and will do the right thing,
but other browsers and "browser like simulations" such
as ns_httpget fail to "do the right thing" and end up
returning a 404 (ns_httpget will look for
http://host/nextpage.tcl)  (I encountered this in both
AOLserver/ns_httpget as well as on a web server load
tester.)

Suggested solutions:

1.  Have ns_returnredirect throw an error if the
passed in location isn't an absoluteURI (that places
the responsibility on the developer to pass in
absoluteURIs.)

2.  Follow the suggestion of the ACS routine
ad_returnredirect and check the location.  If it's not
an absoluteURI, try and create one using the state of
the current connection (using the current directory
and the value of the HOST field and/or the driver
location.)

----------------------------------------------------------------------

You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=103152&aid=446689&group_id=3152

Reply via email to