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

« back to all changes in this revision

Viewing changes to ivle/webapp/filesystem/browser/media/browser.js

  • Committer: William Grant
  • Date: 2009-03-25 11:07:26 UTC
  • Revision ID: grantw@unimelb.edu.au-20090325110726-o0kpof4rwbov9yby
Don't treat an empty X-IVLE-Action-Error header as an error condition.

This makes some sense, and IE8 violates the XHR spec by conveniently
returning an empty string instead of null for a non-existent header.

Show diffs side-by-side

added added

removed removed

Lines of Context:
144
144
            /* Check for action errors reported by the server, and report them
145
145
             * to the user */
146
146
            var error = response.getResponseHeader("X-IVLE-Action-Error");
147
 
            if (error != null)
 
147
            if (error != null && error != "")
148
148
                /* Note: This header (in particular) comes URI-encoded, to
149
149
                 * allow multi-line error messages. Decode */
150
150
                alert("Error: " + decodeURIComponent(error.toString()) + ".");