Skip to content

Commit

Permalink
Merge pull request #353 from jakerella/header-bug
Browse files Browse the repository at this point in the history
Fix bug in content-type header
  • Loading branch information
jakerella committed Mar 30, 2020
2 parents 6b29cbd + 53cc1a5 commit 21c171e
Show file tree
Hide file tree
Showing 14 changed files with 10,625 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ before_script:
- "sudo chmod 4755 /opt/google/chrome/chrome-sandbox"
language: node_js
node_js:
- "8.9.4"
- "12.16.1"
before_install: npm install -g grunt-cli
branches:
only:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 2020-03-30 v2.5.1
* Fixed issue with capitalization of the "content-type" header
* Added newer version of jQuery for testing
* Fixed issue where we were not running one subset of tests

## 2018-07-29 v2.5.0
* Added support for ignoring test files in the automated runs; this was necessary
because Browserstack does something weird with the console and it causes
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# jQuery Mockjax: Ajax request mocking #
[http://github.com/jakerella/jquery-mockjax/](http://github.com/jakerella/jquery-mockjax/)

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/72d5f8c1c29ee60f6282d7d3fa9cb52c)](https://www.codacy.com/app/mikehostetler_1249/jquery-mockjax?utm_source=github.com&utm_medium=referral&utm_content=appendto/jquery-mockjax)
[![Travis CI Badge](https://travis-ci.org/jakerella/jquery-mockjax.svg?branch=master)](https://travis-ci.org/jakerella/jquery-mockjax)
[![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=REpZNzZpeWkzMTY2dERuTkkyYVpnTmM1SmZKMGE5cjdVNEVZNjNYelk3ND0tLXpsRGJjaTNhM0RYNnZoVjU2QXVCRnc9PQ==--7bb0e1bf6af34ba1b15703463673c619b1daf292)](https://www.browserstack.com/automate/public-build/REpZNzZpeWkzMTY2dERuTkkyYVpnTmM1SmZKMGE5cjdVNEVZNjNYelk3ND0tLXpsRGJjaTNhM0RYNnZoVjU2QXVCRnc9PQ==--7bb0e1bf6af34ba1b15703463673c619b1daf292)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/72d5f8c1c29ee60f6282d7d3fa9cb52c)](https://www.codacy.com/app/mikehostetler_1249/jquery-mockjax)
[![Travis CI Badge](https://travis-ci.com/jakerella/jquery-mockjax.svg?branch=master)](https://travis-ci.com/jakerella/jquery-mockjax)
[![BrowserStack Status](https://automate.browserstack.com/badge.svg?badge_key=alZyelpKSWI1WlpxellOQXdPUHBMd2UvQnFmTTFnOEJ2V1FSVXo3a3JPbz0tLWk4alJ6aXJWZVV6bmN6QUZBUTQ5UVE9PQ==--fd0f170c41cb4b3eac0a35aaef09b1ead3b55a0cjquery-mockjax)](https://automate.browserstack.com/public-build/alZyelpKSWI1WlpxellOQXdPUHBMd2UvQnFmTTFnOEJ2V1FSVXo3a3JPbz0tLWk4alJ6aXJWZVV6bmN6QUZBUTQ5UVE9PQ==--fd0f170c41cb4b3eac0a35aaef09b1ead3b55a0cjquery-mockjax)

There are some minor breaking changes in v2, so if you need an older version, please check the [v1.x](https://github.com/jakerella/jquery-mockjax/tree/v1.x) branch or the list of [releases](https://github.com/jakerella/jquery-mockjax/tags) in Github.

Expand Down
6 changes: 3 additions & 3 deletions dist/jquery.mockjax.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*! jQuery Mockjax
* A Plugin providing simple and flexible mocking of ajax requests and responses
*
* Version: 2.5.0
* Version: 2.5.1
* Home: https://github.com/jakerella/jquery-mockjax
* Copyright (c) 2018 Jordan Kasper, formerly appendTo;
* Copyright (c) 2020 Jordan Kasper, formerly appendTo;
* NOTE: This repository was taken over by Jordan Kasper (@jakerella) October, 2014
*
* Dual licensed under the MIT or GPL licenses.
Expand Down Expand Up @@ -424,7 +424,7 @@
var headers = '';
// since jQuery 1.9 responseText type has to match contentType
if (mockHandler.contentType) {
mockHandler.headers['Content-Type'] = mockHandler.contentType;
mockHandler.headers['content-type'] = mockHandler.contentType;
}
$.each(mockHandler.headers, function(k, v) {
headers += k + ': ' + v + '\n';
Expand Down
2 changes: 1 addition & 1 deletion dist/jquery.mockjax.min.js

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions grunt-config-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ module.exports = {
'3.0.0',
'3.1.1',
'3.2.1',
'3.3.1'
'3.3.1',
'3.4.1'
]
},
requirejs: {
Expand All @@ -88,22 +89,22 @@ module.exports = {
'1.9.1',
'1.12.4',
'2.2.4',
'3.3.1'
'3.4.1'
]
},
latestInBranch: {
jQueryVersions: [
'1.12.4',
'2.2.4',
'3.3.1'
'3.4.1'
]
},
oldestAndLatest: {
jQueryVersions: [
'1.5.2',
'1.12.4',
'2.2.4',
'3.3.1'
'3.4.1'
]
},
edge: {
Expand All @@ -126,7 +127,8 @@ module.exports = {
'3.0.0',
'3.1.1',
'3.2.1',
'3.3.1'
'3.3.1',
'3.4.1'
]
},
browserify: {
Expand Down

0 comments on commit 21c171e

Please sign in to comment.