Re: [Webware-discuss] ModSnakeAdapter patch

> >Gah! I meant ModSnakeAdapter. I don't know why I typo'd that...
>
> Another question, are you using 0.5.1rc3 or are you using a CVS
> checkout? I suspect that ModSnakeAdapter is broken in other ways in CVS
> but I can't verify it because I use Windows, and mod_snake doesn't run on
> Windows.
Yep, I'm using 0.5.1rc3
I'm willing to give the CVS a test-drive some time in the future,
but I don't have the time at the moment.
David

Thread view

Hi,
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 ModPythonAdapter.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

Do you mean ModPythonAdapter or ModSnakeAdapter? You mentioned both.
A similar fix has already been made in the CVS version of ModPythonAdapter,
but maybe ModSnakeAdapter hasn't been kept up to date.
At 05:01 PM 6/26/01 +0100, David O'Callaghan wrote:
>Hi,
>
>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 ModPythonAdapter.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
>
>
>_______________________________________________
>Webware-discuss mailing list
>Webware-discuss@...
>http://lists.sourceforge.net/lists/listinfo/webware-discuss
--
- Geoff Talvola
gtalvola@...

> Do you mean ModPythonAdapter or ModSnakeAdapter? You mentioned both.
>
> A similar fix has already been made in the CVS version of
ModPythonAdapter,
> but maybe ModSnakeAdapter hasn't been kept up to date.
>
Gah! I meant ModSnakeAdapter. I don't know why I typo'd that...

At 06:18 PM 6/26/01 +0100, David O'Callaghan wrote:
> > Do you mean ModPythonAdapter or ModSnakeAdapter? You mentioned both.
> >
> > A similar fix has already been made in the CVS version of
>ModPythonAdapter,
> > but maybe ModSnakeAdapter hasn't been kept up to date.
> >
>
>Gah! I meant ModSnakeAdapter. I don't know why I typo'd that...
Another question, are you using 0.5.1rc3 or are you using a CVS
checkout? I suspect that ModSnakeAdapter is broken in other ways in CVS
but I can't verify it because I use Windows, and mod_snake doesn't run on
Windows.
--
- Geoff Talvola
gtalvola@...

> >Gah! I meant ModSnakeAdapter. I don't know why I typo'd that...
>
> Another question, are you using 0.5.1rc3 or are you using a CVS
> checkout? I suspect that ModSnakeAdapter is broken in other ways in CVS
> but I can't verify it because I use Windows, and mod_snake doesn't run on
> Windows.
Yep, I'm using 0.5.1rc3
I'm willing to give the CVS a test-drive some time in the future,
but I don't have the time at the moment.
David