Hi,
I'm pretty new to Django development.
I have a page where I set some cookies based on responses to a POST.
I'm finding that for certain values, set_cookie is resulting in the
cookie value being enclosed in double quotes. This seems to happen
for longer values with non-alphanumeric characters.
Some snippets below:
response_params =
urlparse.parse_qs(urllib2.urlopen(request).read())
....
t = loader.get_template('foo.html')
response = HttpResponse(t.render({ }))
response.set_cookie('c1', response_params['v1'][0])
response.set_cookie('c2', response_params['v2'][0])
This results in a response like:
Set-Cookie: c1="Foo.Bar:11111"; Path=/
Set-Cookie: c2=10000; Path=/
How do I prevent the c1 value from having the double quotes around
it? I don't have the same problem with c1.
Thanks.
--
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.