Skip to main content

Bug Tracker

Side navigation

#2890 closed enhancement (fixed)

Opened May 17, 2008 08:31AM UTC

Closed June 15, 2010 02:32AM UTC

Ajax.HttpData should examine response content-type for data evaluation

Reported by: mnichols Owned by:
Priority: major Milestone: 1.2.4
Component: ajax Version: 1.2.3
Keywords: httpData dataType dynamic Cc:
Blocked by: Blocking:
Description

The current implementation requires the user to explicitly state 'script' or 'json' for jq to evaluate the responseText. Since the method is currently inspecting the response content-type property for xml handling it should also do this for /script/ and /json/ dataTypes without requiring user explicit property setting.

Why? Sometimes the server might return a script and other times raw html, so this would allow the server some flexibility.

I have attached a patch that follows the same semantics as xml handling.

Attachments (1)
  • ajax.httpData (0.9 KB) - added by mnichols May 17, 2008 08:32AM UTC.

    Implements similar semantics for all dataTypes not html

Change History (2)

Changed May 17, 2008 08:36AM UTC by mnichols comment:1

Looks like #2733 is similar...except mine has a patch :)

Changed June 15, 2010 02:32AM UTC by dmethvin comment:2

resolution: → fixed
status: newclosed

Fixed via #5718.