Uploaded image for project: 'Shindig'
  1. Shindig
  2. SHINDIG-1356

Remove leading characters in XHR callback processing which may be inserted if apache has transfer-encoding: chunked

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.0.0-RC2
    • Javascript
    • None

    Description

      When running on Apache with transfer-encoding: chunked there may be some line breaks \n before the message. The following fix filters these out:

      Index: features/src/main/javascript/features/core.io/io.js
      ===================================================================
      — features/src/main/javascript/features/core.io/io.js (Revision 952257)
      +++ features/src/main/javascript/features/core.io/io.js (Arbeitskopie)
      @@ -132,6 +132,9 @@
      return;
      }
      var txt = xobj.responseText;
      + // remove any leading characters like \n
      + // this happens if apache has transfer-encoding: chunked
      + txt = txt.substr(txt.indexOf(UNPARSEABLE_CRUFT))
      // remove unparseable cruft used to prevent cross-site script inclusion
      txt = txt.substr(UNPARSEABLE_CRUFT.length);
      // We are using eval directly here because the outer response comes from a

      Attachments

        Activity

          People

            Unassigned Unassigned
            bhofmann Bastian Hofmann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: