Changeset 581 for trunk/packages


Ignore:
Timestamp:
Jun 3, 2008, 1:59:17 AM (17 years ago)
Author:
ecprice
Message:

Avoid using os.environ in wsgi.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-www/code/main.py

    r579 r581  
    77import datetime
    88import hmac
    9 import os
    109import sha
    1110import simplejson
     
    263262             has_vnc=has_vnc,
    264263             machine=machine,
    265              hostname=os.environ.get('SERVER_NAME', 'localhost'),
     264             hostname=state.environ.get('SERVER_NAME', 'localhost'),
    266265             authtoken=token)
    267266    return templates.vnc(searchList=[d])
     
    613612        self.username = getUser(environ)
    614613        self.state = State(self.username)
     614        self.state.environ = environ
    615615
    616616    def __iter__(self):
     
    620620        if not operation:
    621621            self.start("301 Moved Permanently", [('Location',
    622                                                   os.environ['SCRIPT_NAME']+'/')])
     622                                                  self.environ['SCRIPT_NAME']+'/')])
    623623            return
    624624        if self.username is None:
Note: See TracChangeset for help on using the changeset viewer.