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

« back to all changes in this revision

Viewing changes to lib/fileservice_lib/__init__.py

  • Committer: mattgiuca
  • Date: 2008-06-23 09:45:03 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:785
fileservice_lib/__init__.py: X-IVLE-Action-Error HTTP response header is now
    URI-encoded. This allows multi-line error messages without producing
    invalid HTTP.
www/media/browser/browser.js: URI-decodes the X-IVLE-Action-Error response
    header, so it displays normally.

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
import stat
84
84
import time
85
85
import mimetypes
 
86
import urllib
86
87
 
87
88
import cjson
88
89
import pysvn
119
120
        try:
120
121
            action.handle_action(req, act, fields)
121
122
        except action.ActionError, message:
122
 
            req.headers_out['X-IVLE-Action-Error'] = str(message)
 
123
            req.headers_out['X-IVLE-Action-Error'] = \
 
124
                urllib.quote(str(message))
123
125
 
124
126
    return_type = fields.getfirst('return')
125
127
    listing.handle_return(req, return_type == "contents")