aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng/httpSpec.js
diff options
context:
space:
mode:
authorVojta Jina2012-06-07 17:10:39 -0700
committerIgor Minar2012-06-08 16:07:15 -0700
commit10f80d7d2918f98262090b425ecc294d9518aa7e (patch)
tree149296c2434abffc2f1fc933810b3659c62907ab /test/ng/httpSpec.js
parentc3a41ff9fefe894663c4d4f40a83794521deb14f (diff)
downloadangular.js-10f80d7d2918f98262090b425ecc294d9518aa7e.tar.bz2
fix($http): add utf-8 to default Content-Type header (post/put)
This fixes special characters issue with MongoLab. https://groups.google.com/d/topic/angular/1T6h7bfZ7Rs/discussion
Diffstat (limited to 'test/ng/httpSpec.js')
-rw-r--r--test/ng/httpSpec.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ng/httpSpec.js b/test/ng/httpSpec.js
index 9c01db65..bb4de3c1 100644
--- a/test/ng/httpSpec.js
+++ b/test/ng/httpSpec.js
@@ -384,7 +384,7 @@ describe('$http', function() {
$httpBackend.expect('POST', '/url', 'messageBody', function(headers) {
return headers['Accept'] == 'application/json, text/plain, */*' &&
headers['X-Requested-With'] == 'XMLHttpRequest' &&
- headers['Content-Type'] == 'application/json';
+ headers['Content-Type'] == 'application/json;charset=utf-8';
}).respond('');
$http({url: '/url', method: 'POST', headers: {}, data: 'messageBody'});
@@ -396,7 +396,7 @@ describe('$http', function() {
$httpBackend.expect('PUT', '/url', 'messageBody', function(headers) {
return headers['Accept'] == 'application/json, text/plain, */*' &&
headers['X-Requested-With'] == 'XMLHttpRequest' &&
- headers['Content-Type'] == 'application/json';
+ headers['Content-Type'] == 'application/json;charset=utf-8';
}).respond('');
$http({url: '/url', method: 'PUT', headers: {}, data: 'messageBody'});