Changeset 51:eca383e1401c
- Timestamp:
- 12/02/06 11:40:02
(2 years ago)
- Author:
- Allan Saddi <allan@saddi.com>
- branch:
- default
- convert_revision:
- svn:46762da8-4eb7-0310-94e9-d918b60927c8/flup/trunk@2172
- Message:
Add forceCookieOutput attribute to SessionService? to
force Set-Cookie output for the current request.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r50 |
r51 |
|
| | 1 | 2006-12-02 Allan Saddi <asaddi@sahara.flup.org> |
|---|
| | 2 | |
|---|
| | 3 | * Add forceCookieOutput attribute to SessionService to |
|---|
| | 4 | force Set-Cookie output for the current request. |
|---|
| | 5 | |
|---|
| 1 | 6 | 2006-12-01 Allan Saddi <asaddi@europa.saddi.net> |
|---|
| 2 | 7 | |
|---|
| r42 |
r51 |
|
| 541 | 541 | service.cookieAttributes - Dictionary of additional RFC2109 attributes |
|---|
| 542 | 542 | to be added to the generated cookie. |
|---|
| | 543 | service.forceCookieOutput - Normally False. Set to True to force |
|---|
| | 544 | output of the Set-Cookie header during this request. |
|---|
| 543 | 545 | """ |
|---|
| 544 | 546 | _expiredSessionIdentifier = 'expired session' |
|---|
| … | … | |
| 553 | 555 | self._cookieExpiration = cookieExpiration |
|---|
| 554 | 556 | self.cookieAttributes = dict(cookieAttributes) |
|---|
| | 557 | self.forceCookieOutput = False |
|---|
| 555 | 558 | self._fieldName = fieldName |
|---|
| 556 | 559 | |
|---|
| … | … | |
| 616 | 619 | def addCookie(self, headers): |
|---|
| 617 | 620 | """Adds Set-Cookie header if needed.""" |
|---|
| 618 | | if not self.encodesSessionInURL and self._shouldAddCookie(): |
|---|
| | 621 | if not self.encodesSessionInURL and \ |
|---|
| | 622 | (self._shouldAddCookie() or self.forceCookieOutput): |
|---|
| 619 | 623 | if self._session is not None: |
|---|
| 620 | 624 | sessId = self._sessionIdentifier() |
|---|