Hi Malcom,

Thanks for the response. I thought the same about the request headers
being read only, and hadn't heard of something modifying the request
header, only the response.

b

On Feb 18, 5:02 pm, Malcolm Tredinnick <malc...@pointy-stick.com>
wrote:
> On Wed, 2009-02-18 at 07:16 -0800, Brandon Taylor wrote:
> > Hi everyone,
>
> > I know how to modify a responseheadervalue, but not arequestheader
> > value. I need to integrate with an external system that is injecting a
> > value in therequestheaderthat I need to check for.
>
> > Is it possible to mock this behavior in Django? I'm not very familiar
> > with how these values get added to therequest/response from Apache in
> > the first place.
>
> Are you trying to modify them in the test system? If so, you can add
> headers via the test.client.Client class. That simulates setting them on
> the  client side.
>
> If you're trying to modify them some other way, then the answer is
> "don't do that".Requestobjects are read-only, not modifiable.
>
> Your final question, above, doesn't make a lot of sense. Headers are
> part of the HTTP data. They are just lines of text at the start of 
> therequest. Apache (or other web server) parses those lines and passes
> them, via some data structure or other, to consumers such as Django.
> Django then uses that data structure (it's different for, say,
> mod_python and WSGI interfaces) to create therequest.META dictionary.
>
> Regards,
> Malcolm
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to