These are chat archives for django/django

1st
Feb 2017
Raphael Deem
@r0fls
Feb 01 2017 08:03
If you're writing new Python code you should target it for 3. The last version of python2 with official support from the core devs was released in decemeber, iirc.
John
@flyboy1565
Feb 01 2017 13:45
@r0fls , I currently use python 2, but have begun writing in py3.. most people would probably recommend using py3
Paul Aranguren
@Van_Guren_twitter
Feb 01 2017 15:39
How long did it take you guys from learning flask to actually get employable?
Day 0 -> employable *
Sorry Django
I had my mind somewhere else, flask specifically lol
Connor Mendenhall
@ecmendenhall
Feb 01 2017 17:47
Hi everyone! My team is running into an old Django bug that seems to have come back from the dead. Here’s the original ticket from Django, closed 5 years ago: https://code.djangoproject.com/ticket/15863

We’re very occasionally seeing malformed “Set-Cookie” headers on responses from our application server, as described in that ticket. Rather than the expected format, something like:

"Set-Cookie: cookiename=XX; Max-Age: YY; Path=/"

We’re instead seeing the whole header as the cookie value, something like:

'Set-Cookie: cookiename="Set-Cookie: cookiename=XX Max-Age: YY; Path=/"'

This is a very weird one, and a total poison pill for users when it happens to the sessionid or csrftoken cookies: they get set to malformed values and subsequent authenticated or CSRF-protected requests fail until the user clears their cookies.
I’m wondering if any old Django hands have run into something like this before, especially since it's very similar to that old ticket.
The ticket above describes exactly the behavior we’re seeing, but 1) it was closed out 5 years ago and 2) We’re not using the file or db cache backends—we use Redis as our cache backend.