Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#12 ModSnakeAdapter.py patch

closed-accepted
nobody
None
5
2002-03-14
2001-06-26
No

I found I was having problems redirecting to non-local
pages using sendRedirect or setting the headers
manually. It worked fine with the CGIAdapter and I
found that it was the fault of a line in
ModSnakeAdapter

The problem was that the headers were being split on a
colon but if the value contained any colons, only the
first section was being used. So

Location: https://blah...

became

Location: https

And I'd get a 404 for the local file https

So here's the change needed in ModSnakeAdapter.py, as
I see it:

136c136
< req.headers_out[header[0]] = header[1]
---
> req.headers_out[header[0]] = string.join(header
[1:], ":")

Regards,

David O'Callaghan

Discussion

  • Geoff Talvola
    Geoff Talvola
    2002-03-14

    • status: open --> closed-accepted