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

« back to all changes in this revision

Viewing changes to ivle/dispatch/request.py

  • Committer: William Grant
  • Date: 2010-07-28 04:12:08 UTC
  • mfrom: (1790.1.8 codemirror-srsly)
  • Revision ID: grantw@unimelb.edu.au-20100728041208-mciagtog1785oje4
Move from CodePress to CodeMirror. It's now an external dependency, too, so you'll need to install it yourself.

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
            in class Request.
96
96
        content_type (write)
97
97
            String. The Content-Type (mime type) header value.
98
 
        content_length (write)
99
 
            Integer. The number of octets to be transfered.
100
98
        location (write)
101
99
            String. Response "Location" header value. Used with HTTP redirect
102
100
            responses.
150
148
        # Default values for the output members
151
149
        self.status = Request.HTTP_OK
152
150
        self.content_type = None        # Use Apache's default
153
 
        self.content_length = None        # Don't provide Content-Length
154
151
        self.location = None
155
152
        # In some cases we don't want the template JS (such as the username
156
153
        # and public FQDN) in the output HTML. In that case, set this to 0.
179
176
        # Prepare the HTTP and HTML headers before the first write is made
180
177
        if self.content_type != None:
181
178
            self.apache_req.content_type = self.content_type
182
 
        if self.content_length:
183
 
            self.apache_req.set_content_length(self.content_length)
184
179
        self.apache_req.status = self.status
185
180
        if self.location != None:
186
181
            self.apache_req.headers_out['Location'] = self.location