Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-8977

Simple REST Interface --JSONP sending wrong MIME type

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Gone away
    • Affects Version/s: 2.2.1
    • Fix Version/s: None
    • Component/s: HTTP Console
    • Labels:
      None
    • Environment:
      Running on MacOS 10.7.5 - problem not verified on other platforms
    • Operating System:
      OS X
    • Steps To Reproduce:
      Hide

      Start server with: mongod --rest --jsonp
      Make JSONP call with JQuery
      Review error message

      Show
      Start server with: mongod --rest --jsonp Make JSONP call with JQuery Review error message

      Description

      I am having a play with the Simple REST Interface via "mongod --rest --jsonp" and have run into the following error when making calls with JQquery:

      Resource interpreted as Script but transferred with MIME type text/plain

      The JQuery I am using is pretty standard:

      $.ajax({
      type: 'GET',
      url: queryUrl,
      async: true,
      contentType: "application/json",
      dataType: 'jsonp',
      jsonp: 'jsonp',
      success: function(msg) {
      if (msg.response != null && msg.response.success == true)

      { $("textarea#queryResult").val(JSON.stringify( msg.data, null, '\t' )); }

      },
      error: function(jqXHR, textStatus, errorThrown)

      { $("textarea#queryResult").val("Error: " + textStatus + " " + errorThrown); }

      });

        Attachments

          Activity

            People

            Assignee:
            backlog-server-platform DO NOT USE - Backlog - Platform Team
            Reporter:
            cvitter@ikanow.com Craig Vitter
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: