Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Ticket #289 (defect)

Opened 3 years ago

Last modified 3 years ago

海外公司注册登记

Status: closed (fixed)

Reported by: rdelon Assigned to: rdelon
Priority: normal Milestone: 2.2-beta
Component: CherryPy code Keywords: 海外公司注册登记
Cc: 海外公司注册登记

Change History

10/18/05 09:16:19: Modified by mikerobi

  • summary changed from Allow users to configure session cookie attributes such as domain, ... to Allow users to configure session cookie attributes such as domain, path, ....

Copied from ticket:350

In order to support multiple applications on one server (using virtual path filter, for example) it is extremely helpful to be able to define the path for the session cookie. This way we can use the same cookie name without any problems.

To support this, I made the following changes to sessionfilter.py:

154a155,158 > > # Get cookie path from config > cookiePath = conf('sessionFilter.cookiePath', '/') > 158c162 < cookie[cookieName]['path'] = '/' --- > cookie[cookieName]['path'] = cookiePath

10/18/05 09:54:13: Modified by Charles Scheffold <charles.scheffold@verizonwireless.com>

After some further development, this seems even more useful (sessionfilter.py, line 156):

# Get cookie path from config or headers
# NOTE: sessionFilter.cookiePath always takes precedence
cookiePath = '/'
headerName = conf('sessionFilter.cookiePathFromHeader', '')
if headerName:
    cookiePath = cherrypy.request.headerMap.get(headerName,'/' )
if conf('sessionFilter.cookiePath', ''):
    cookiePath = conf('sessionFilter.cookiePath', '/')

The new config options are:

sessionFilter.cookiePath specifies an alternate path to use when setting the session cookie.

sessionFilter.cookiePathFromHeader specifies the name of a request header that will contain the cookie path to use i.e. "CP-Location". Very useful when serving multiple applications from different paths under Apache.

11/25/05 12:40:39: Modified by rdelon

  • status changed from new to assigned.

01/24/06 07:11:36: Modified by rdelon

  • status changed from assigned to closed.
  • resolution set to fixed.

Fixed in [289]

Hosted by WebFaction

Log in as guest/cpguest to create tickets