On Tue, May 31, 2016 at 7:53 AM, Larry Martell <larry.martell@gmail.com> wrote:
> I need to set a custom header before I do a redirect. My code does this:
>
> resp = redirect(uri)
> resp['X-Capdata-Auth'] = 'authorized'
> return resp
>
> But when I look at the traffic with tcpdump, I do not see that header
> value. What am I doing wrong here?
I traced the django code all the way through to when the response is
going out and I see this:
(Pdb) response._headers
{'x-capdata-auth': ('X-Capdata-Auth', 'authorized'), 'content-type':
('Content-Type', 'text/html; charset=utf-8'), 'location': ('Location',
'http://foo.bar.com:8000/workitem/12345'), 'vary': ('Vary', 'Cookie')}
Any one have any ideas as to why it doesn't seem to make it out?
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CACwCsY4wF%2B_PTjOpcbBBXW5yZ6eRgVhmO1rX4Mnn-okvm2qDsg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment