~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to lib/common/cgirequest.py

  • Committer: dcoles
  • Date: 2008-07-03 04:20:54 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:803
Setup: Modularised setup.py so it is now no longer over 1000 lines. This should 
allow us to get in there and tidy up each module much easier. Also removed 
updatejails since this functionality seems to be duplicated with remakeuser.py 
and remakealluser.py scripts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
123
123
 
124
124
        if ('SERVER_NAME' not in os.environ or
125
125
            'REQUEST_METHOD' not in os.environ or
126
 
            'REQUEST_URI' not in os.environ):
 
126
            'SCRIPT_NAME' not in os.environ or
 
127
            'PATH_INFO' not in os.environ):
127
128
            raise Exception("No CGI environment found")
128
129
 
129
130
        # Determine if the browser used the public host name to make the
135
136
 
136
137
        # Inherit values for the input members
137
138
        self.method = os.environ['REQUEST_METHOD']
138
 
        self.uri = os.environ['REQUEST_URI']
 
139
        self.uri = os.environ['SCRIPT_NAME'] + os.environ['PATH_INFO']
139
140
        # Split the given path into the app (top-level dir) and sub-path
140
141
        # (after first stripping away the root directory)
141
142
        path = common.util.unmake_path(self.uri)
142
143
        if self.publicmode:
143
144
            self.app = None
144
 
            self.path = path
 
145
            (_, self.path) = (common.util.split_path(path))
145
146
        else:
146
147
            (self.app, self.path) = (common.util.split_path(path))
147
148
        self.user = None