Skip to content

Commit 21c171e

Browse files
authored
Merge pull request #353 from jakerella/header-bug
Fix bug in content-type header
2 parents 6b29cbd + 53cc1a5 commit 21c171e

14 files changed

+10625
-18
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ before_script:
77
- "sudo chmod 4755 /opt/google/chrome/chrome-sandbox"
88
language: node_js
99
node_js:
10-
- "8.9.4"
10+
- "12.16.1"
1111
before_install: npm install -g grunt-cli
1212
branches:
1313
only:

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 2020-03-30 v2.5.1
2+
* Fixed issue with capitalization of the "content-type" header
3+
* Added newer version of jQuery for testing
4+
* Fixed issue where we were not running one subset of tests
5+
16
## 2018-07-29 v2.5.0
27
* Added support for ignoring test files in the automated runs; this was necessary
38
because Browserstack does something weird with the console and it causes

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# jQuery Mockjax: Ajax request mocking #
22
[http://github.com/jakerella/jquery-mockjax/](http://github.com/jakerella/jquery-mockjax/)
33

4-
[![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)
5-
[![Travis CI Badge](https://travis-ci.org/jakerella/jquery-mockjax.svg?branch=master)](https://travis-ci.org/jakerella/jquery-mockjax)
6-
[![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=REpZNzZpeWkzMTY2dERuTkkyYVpnTmM1SmZKMGE5cjdVNEVZNjNYelk3ND0tLXpsRGJjaTNhM0RYNnZoVjU2QXVCRnc9PQ==--7bb0e1bf6af34ba1b15703463673c619b1daf292)](https://www.browserstack.com/automate/public-build/REpZNzZpeWkzMTY2dERuTkkyYVpnTmM1SmZKMGE5cjdVNEVZNjNYelk3ND0tLXpsRGJjaTNhM0RYNnZoVjU2QXVCRnc9PQ==--7bb0e1bf6af34ba1b15703463673c619b1daf292)
4+
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/72d5f8c1c29ee60f6282d7d3fa9cb52c)](https://www.codacy.com/app/mikehostetler_1249/jquery-mockjax)
5+
[![Travis CI Badge](https://travis-ci.com/jakerella/jquery-mockjax.svg?branch=master)](https://travis-ci.com/jakerella/jquery-mockjax)
6+
[![BrowserStack Status](https://automate.browserstack.com/badge.svg?badge_key=alZyelpKSWI1WlpxellOQXdPUHBMd2UvQnFmTTFnOEJ2V1FSVXo3a3JPbz0tLWk4alJ6aXJWZVV6bmN6QUZBUTQ5UVE9PQ==--fd0f170c41cb4b3eac0a35aaef09b1ead3b55a0cjquery-mockjax)](https://automate.browserstack.com/public-build/alZyelpKSWI1WlpxellOQXdPUHBMd2UvQnFmTTFnOEJ2V1FSVXo3a3JPbz0tLWk4alJ6aXJWZVV6bmN6QUZBUTQ5UVE9PQ==--fd0f170c41cb4b3eac0a35aaef09b1ead3b55a0cjquery-mockjax)
77

88
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.
99

dist/jquery.mockjax.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*! jQuery Mockjax
22
* A Plugin providing simple and flexible mocking of ajax requests and responses
33
*
4-
* Version: 2.5.0
4+
* Version: 2.5.1
55
* Home: https://github.com/jakerella/jquery-mockjax
6-
* Copyright (c) 2018 Jordan Kasper, formerly appendTo;
6+
* Copyright (c) 2020 Jordan Kasper, formerly appendTo;
77
* NOTE: This repository was taken over by Jordan Kasper (@jakerella) October, 2014
88
*
99
* Dual licensed under the MIT or GPL licenses.
@@ -424,7 +424,7 @@
424424
var headers = '';
425425
// since jQuery 1.9 responseText type has to match contentType
426426
if (mockHandler.contentType) {
427-
mockHandler.headers['Content-Type'] = mockHandler.contentType;
427+
mockHandler.headers['content-type'] = mockHandler.contentType;
428428
}
429429
$.each(mockHandler.headers, function(k, v) {
430430
headers += k + ': ' + v + '\n';

dist/jquery.mockjax.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

grunt-config-options.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ module.exports = {
7878
'3.0.0',
7979
'3.1.1',
8080
'3.2.1',
81-
'3.3.1'
81+
'3.3.1',
82+
'3.4.1'
8283
]
8384
},
8485
requirejs: {
@@ -88,22 +89,22 @@ module.exports = {
8889
'1.9.1',
8990
'1.12.4',
9091
'2.2.4',
91-
'3.3.1'
92+
'3.4.1'
9293
]
9394
},
9495
latestInBranch: {
9596
jQueryVersions: [
9697
'1.12.4',
9798
'2.2.4',
98-
'3.3.1'
99+
'3.4.1'
99100
]
100101
},
101102
oldestAndLatest: {
102103
jQueryVersions: [
103104
'1.5.2',
104105
'1.12.4',
105106
'2.2.4',
106-
'3.3.1'
107+
'3.4.1'
107108
]
108109
},
109110
edge: {
@@ -126,7 +127,8 @@ module.exports = {
126127
'3.0.0',
127128
'3.1.1',
128129
'3.2.1',
129-
'3.3.1'
130+
'3.3.1',
131+
'3.4.1'
130132
]
131133
},
132134
browserify: {

0 commit comments

Comments
 (0)