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

Simple REST Interface --JSONP sending wrong MIME type

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor - P4
    • Resolution: Gone away
    • 2.2.1
    • None
    • HTTP Console
    • None
    • Running on MacOS 10.7.5 - problem not verified on other platforms
    • OS X
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: