I ran the simple counter example with webpy cookie sessions branch
What goes  in the rsa.key file?
thanks for any help with running webpy with the sessions module and
cookiehandler

web/session.py
session_parameters = web.utils.Storage({
    'cookie_name': 'webpy',
    # name of the cookie which will transfer the session id
    'cookie_domain': None,
    # cookie domain for the setcookie() when setting session id cookie

    'timeout': 600,
    'max_age': 24 * 60 * 60,

    'id_seed': 'web.py',
    'regenerate_id': True, # on every request regenerate id and set again
cookie
    'generator': False,    # if False, use default generator

    'ignore_expiration': False,
    'ignore_old_age': True,
    'ignore_change_ip': True,
    # if the pair ( id, ip ) doesn't match the db, then fail/raise
exception/...

    'handler': 'cookie'
})

handler_parameters = web.utils.Storage({
    'file_dir': '/tmp',        # storage dir
    'file_prefix': 'sess',     # session file prefix
    'db_table': 'session_data', # table name
    'cookie_aes_name': 'dd',
    'cookie_seed_length': 32,
    'cookie_rsa_key_path': 'rsa.key'
})

  # public methods
    def start(self):
        '''starts the session: creates handler object, sets generator,
        regenerates id, sets cookies, calls _identity, _verify,
_generate_id'''
        handler = {'db': DBHandler, 'file': FileHandler,'cookie':
CookieHandler}
        self._handler = handler[web.config.session_parameters.handler]()


http://webpy.org/sessions/simpleexample

[EMAIL PROTECTED] sessions.cookie]$ python code.py
http://0.0.0.0:8080/
Traceback (most recent call last):
  File "c:\Users\mark\Documents\work\code\sessions.cookie\web\webapi.py",
line 312, in wsgifunc
  File "c:\Users\mark\Documents\work\code\sessions.cookie\web\request.py",
line 121, in <lambda>
  File "c:\Users\mark\Documents\work\code\sessions.cookie\web\request.py",
line 61, in handle
  File "code.py", line 28, in GET
    s.save()
  File "c:\Users\mark\Documents\work\code\sessions.cookie\web\session.py",
line 156, in save
  File "c:\Users\mark\Documents\work\code\sessions.cookie\web\session.py",
line 229, in _store
  File "c:\Users\mark\Documents\work\code\sessions.cookie\web\session.py",
line 558, in store
IOError: [Errno 2] No such file or directory: 'rsa.key'

71.202.108.161:62176 - - [15/Feb/2008 14:54:50] "HTTP/1.1 GET /" - 500
Internal Server Error
71.202.108.161:62177 - - [15/Feb/2008 14:54:51] "HTTP/1.1 GET /favicon.ico"
- 404 Not Foun

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to