Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Update session callback #22

Open
wants to merge 1 commit into from

1 participant

@Falmarri

Cookies are being set on requests regardless of the fact that the session was never accessed. This was causing me problems because I have a cookie path set to something other than what my static resources live under. So all calls to all static resources were generating a new cookie which was being sent back to my client, clobbering the real cookie.

@Falmarri Falmarri Update session callback
Cookies are being set on requests regardless of the fact that the session was never accessed. This was causing me problems because I have a cookie path set to something other than what my static resources live under. So all calls to all static resources were generating a new cookie which was being sent back to my client, clobbering the real cookie.
00ff83e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 10, 2014
  1. @Falmarri

    Update session callback

    Falmarri authored
    Cookies are being set on requests regardless of the fact that the session was never accessed. This was causing me problems because I have a cookie path set to something other than what my static resources live under. So all calls to all static resources were generating a new cookie which was being sent back to my client, clobbering the real cookie.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 pyramid_beaker/__init__.py
View
4 pyramid_beaker/__init__.py
@@ -25,8 +25,8 @@ def __init__(self, request):
SessionObject.__init__(self, request.environ, **self._options)
def session_callback(request, response):
exception = getattr(request, 'exception', None)
- if (exception is None or self._cookie_on_exception
- and self.accessed()):
+ if (exception is None or self._cookie_on_exception) \
+ and self.accessed():
self.persist()
headers = self.__dict__['_headers']
if headers['set_cookie'] and headers['cookie_out']:
Something went wrong with that request. Please try again.