#27328: return `Set-Cookie` if sessionid= None value -------------------------------------+------------------------------------- Reporter: Ramin Farajpour | Owner: nobody Cami | Type: Bug | Status: new Component: HTTP handling | Version: 1.10 Severity: Normal | Resolution: Keywords: | Triage Stage: | Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by Ramin Farajpour Cami): Thanks Tim, i use python 2, do you test this? {{{ self.assertEqual(parse_cookie('sessionid=; csrftoken=d')) }}} my means this is when i use `sessionid=` on request ajax , response this `Set-Cookie: sessionid=;` my opinion when sessionid is empty should not be sessionid "Set-Cookie" on response , code parse_cookie : https://github.com/django/django/blob/master/django/http/cookie.py#L59&L77 i see code here : https://github.com/django/django/blob/master/django/http/response.py#L221&L227 when set on request `sessionid=` empty , pass from `parse_cookie` and in call `delete_cookie` and response `Set-Cookie: sessionid=;` , While this is should be not set on `Set-Cookie` sessionid, my opinion when `sessionid=` should avoid call method `delete_cookie`, -- Ticket URL: <https://code.djangoproject.com/ticket/27328#comment:4> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/065.7db5e9164e058203f4f2f34547570c48%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.