It would also presumably have to either re-set or clear the HTTP_HOST
header if the redirect is to a different domain?


On Aug 20, 9:02 pm, Russell Keith-Magee <[email protected]>
wrote:
> On Fri, Aug 21, 2009 at 2:23 AM, ringemup<[email protected]> wrote:
>
> > I'm writing an application that servers multiple domains with
> > middleware that depends on every request having an HTTP_HOST header.
> > This isn't a problem in the test client with normal GET requests
> > because I can set the HTTP_HOST parameter.  But when the server issues
> > a redirect, the test client doesn't submit the HTTP_HOST header on the
> > second request.  Is there any way I could induce it to?
>
> Not at present, but this would be a good feature addition.
>
> Implementing this could be as simple as passing **extra down to
> _handle_redirects on line 283 of test.client.py (and the equivalent
> for POST,PUT, etc). My only caveat on this solution is that we might
> need to check to see if there are certain headers we _shouldn't_ pass
> down to the redirect. I can't think of any off the top of my head, but
> some research wouldn't hurt.
>
> Yours,
> Russ Magee %-)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to