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

« back to all changes in this revision

Viewing changes to lib/common/cgirequest.py

  • Committer: wagrant
  • Date: 2008-07-10 05:14:06 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:845
CGIRequest.throw_error() will now set the IVLEError HTTP headers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
254
254
        httpcode: An HTTP response status code. Pass a constant from the
255
255
        Request class.
256
256
        """
257
 
        self.status = 200
258
 
        self.headers_out['X-IVLE-CGI-Error'] = httpcode
 
257
        self.status = 500
 
258
        self.headers_out['X-IVLE-Error-Code'] = httpcode
 
259
        self.headers_out['X-IVLE-Error-Message'] = message
259
260
        self.ensure_headers_written()
260
 
        self.write(message)
 
261
        self.write('An internal IVLE error has occurred.')
261
262
        self.flush()
262
263
        sys.exit(self.status)
263
264