Bugs item #510024, was opened at 2002-01-28 20:07
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=103152&aid=510024&group_id=3152

Category: API: Tcl
>Group: aolserver3_4
Status: Open
Resolution: None
Priority: 5
Submitted By: james shannon (jshannon)
Assigned to: Nobody/Anonymous (nobody)
Summary: ns_returnredirect should use strcmp

Initial Comment:
int
Ns_ConnReturnRedirect(Ns_Conn *conn, char *url)
{
    Ns_DString ds, msg;
    int        result;

    Ns_DStringInit(&ds);
    Ns_DStringInit(&msg);
    if (url != NULL) {
        if (*url == '/') {
            Ns_DStringAppend(&ds, Ns_ConnLocation
(conn));
        }


Without knowing exactly what the designers intended, I
have a feeling that instead of checking if *url
== '/', there should be a strcmp there.

The problem I'm running into, specifically is that I
attempting to access the domain (host2.com as set up
in the config) via the URL host1.com. When the tcl
code executes [returnredirect /whatever/path/here] so
that the user gets redirected to
host1.com/whatever/path/here, Ns_ConnReturnRedirect
returns the fully qualified URL of
host2.com/whatever/path/here. If a fully qualified URL
must be used, it should be based upon the host
headers, if they're available.

james

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

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

Reply via email to