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

« back to all changes in this revision

Viewing changes to www/media/browser/browser.js

  • 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:
143
143
             * to the user */
144
144
            var error = response.getResponseHeader("X-IVLE-Action-Error");
145
145
            if (error != null)
146
 
                alert("Error: " + error.toString() + ".");
 
146
                /* Note: This header (in particular) comes URI-encoded, to
 
147
                 * allow multi-line error messages. Decode */
 
148
                alert("Error: " + decodeURIComponent(error.toString()) + ".");
147
149
            /* Now read the response and set up the page accordingly */
148
150
            if (ignore_response != true)
149
151
                handle_response(path, response);