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

« back to all changes in this revision

Viewing changes to www/dispatch/request.py

  • Committer: dilshan_a
  • Date: 2008-01-24 23:49:08 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:292
Fixed bug in get_name for TestSuite.

Show diffs side-by-side

added added

removed removed

Lines of Context:
224
224
 
225
225
        if not self.headers_written:
226
226
            self.__writeheaders()
227
 
        if isinstance(string, unicode):
228
 
            # Encode unicode strings as UTF-8
229
 
            # (Otherwise cannot handle being written to a bytestream)
230
 
            self.apache_req.write(string.encode('utf8'), flush)
231
 
        else:
232
 
            # 8-bit clean strings just get written directly.
233
 
            # This includes binary strings.
234
 
            self.apache_req.write(string, flush)
 
227
        self.apache_req.write(string, flush)
235
228
 
236
229
    def flush(self):
237
230
        """Flushes the output buffer."""
275
268
        """Returns a mod_python Session object for this request.
276
269
        Note that this is dependent on mod_python and may need to change
277
270
        interface if porting away from mod_python."""
278
 
        # Cache the session object and set the timeout to 24 hours.
 
271
        # Cache the session object
279
272
        if not hasattr(self, 'session'):
280
 
            self.session = Session.FileSession(self.apache_req,
281
 
                                               timeout = 60 * 60 * 24)
 
273
            self.session = Session.Session(self.apache_req)
282
274
        return self.session
283
275
 
284
276
    def get_fieldstorage(self):