I discovered a bug in ModPythonAdapter's code to pass documents from
the Application server on to the web server.  In the following snippet:

    def respond(self, req, respdict):
        headerend = string.find(respdict, "\n\n")
        headers = respdict[:headerend]
        for i in string.split(headers, "\n"):
            header = string.split(i, ":")

each header is split on :.  If a header contains multiple colons, for
example:

  Location: http://ofb.net/

it will be split multiple times.  The code then goes on to look only
and the first and second fragments from the split:

            req.headers_out[header[0]] = header[1]

so that, in this case, the header passed on would be

  Location: http

The fix is simple; add ,1 at the end of the colon split:
            header = string.split(i, ":", 1)


I'm using WebWare 0.5, from March 1, 2001.

_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to