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

« back to all changes in this revision

Viewing changes to lib/common/cgirequest.py

  • Committer: mattgiuca
  • Date: 2008-02-05 07:00:46 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:419
cgirequest: Throws an exception if important CGI variables are not found.
scripts/fileservice: Implemented fileservice script which bridges CGIRequest
and fileservice_lib. (Actually just 2 lines of code).

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
        """
120
120
        self.headers_written = False
121
121
 
 
122
        if ('SERVER_NAME' not in os.environ or
 
123
            'REQUEST_METHOD' not in os.environ or
 
124
            'REQUEST_URI' not in os.environ):
 
125
            raise Exception("No CGI environment found")
 
126
 
122
127
        # Determine if the browser used the public host name to make the
123
128
        # request (in which case we are in "public mode")
124
129
        if os.environ['SERVER_NAME'] == conf.public_host: