Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
fixed an issue with JSON content type detection with charset present.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmorton committed Nov 8, 2011
1 parent 95fd88c commit 3466831
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ deploy/src/
[Rr]elease*/
_ReSharper*/
[Tt]est[Rr]esult*
.idea/
.idea/

web.config
4 changes: 2 additions & 2 deletions deploy/sdata-client-debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -1902,8 +1902,8 @@
if (!response.responseText) return null;

var contentType = response.getResponseHeader && response.getResponseHeader('Content-Type');
if ((contentType === 'application/json') || (!contentType && this.isJsonEnabled()))

if (/application\/json/i.test(contentType) || (!contentType && this.isJsonEnabled()))
{
var doc = JSON.parse(response.responseText);

Expand Down
Loading

0 comments on commit 3466831

Please sign in to comment.