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

« back to all changes in this revision

Viewing changes to www/apps/fileservice/__init__.py

  • Committer: mattgiuca
  • Date: 2008-01-09 22:50:43 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:145
fileservice: Removed bad setting of response status to req.OK (this was
    resulting in 500 errors).
dispatch.request: Set all request objects' response status to req.HTTP_OK
    instead of req.OK - this makes the default response status 200 instead
    of 500.

Show diffs side-by-side

added added

removed removed

Lines of Context:
155
155
        req.write("File not found")
156
156
    elif os.path.isdir(path):
157
157
        # It's a directory. Return the directory listing.
158
 
        req.status = req.OK
159
158
        req.content_type = mime_dirlisting
160
159
        req.headers_out['X-IVLE-Return'] = 'Dir'
161
160
        # Start by trying to do an SVN status, so we can report file version
179
178
        req.write(cjson.encode(list))
180
179
    else:
181
180
        # It's a file. Return the file contents.
182
 
        req.status = req.OK
183
181
        req.content_type = mime_filedump
184
182
        req.headers_out['X-IVLE-Return'] = 'File'
185
183