aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/http.js
diff options
context:
space:
mode:
authorHendrixer2014-01-11 15:20:54 -0800
committerVojta Jina2014-01-13 16:50:15 -0800
commite1cfb1957feaf89408bccf48fae6f529e57a82fe (patch)
tree4d3ebdb06507184098eff3fcff3ba0cc137de250 /src/ng/http.js
parent2a3586381fd5016bc51ad9d97fde1a5c7e3990d8 (diff)
downloadangular.js-e1cfb1957feaf89408bccf48fae6f529e57a82fe.tar.bz2
fix($http): ensure default headers PUT and POST are different objects
Send PUT and POST through copy() to make sure they are not the same. Closes #5742 Closes #5747 Closes #5764
Diffstat (limited to 'src/ng/http.js')
-rw-r--r--src/ng/http.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ng/http.js b/src/ng/http.js
index 231e683e..4ca89e4f 100644
--- a/src/ng/http.js
+++ b/src/ng/http.js
@@ -111,9 +111,9 @@ function $HttpProvider() {
common: {
'Accept': 'application/json, text/plain, */*'
},
- post: CONTENT_TYPE_APPLICATION_JSON,
- put: CONTENT_TYPE_APPLICATION_JSON,
- patch: CONTENT_TYPE_APPLICATION_JSON
+ post: copy(CONTENT_TYPE_APPLICATION_JSON),
+ put: copy(CONTENT_TYPE_APPLICATION_JSON),
+ patch: copy(CONTENT_TYPE_APPLICATION_JSON)
},
xsrfCookieName: 'XSRF-TOKEN',
@@ -324,7 +324,7 @@ function $HttpProvider() {
* to `push` or `unshift` a new transformation function into the transformation chain. You can
* also decide to completely override any default transformations by assigning your
* transformation functions to these properties directly without the array wrapper. These defaults
- * are again available on the $http factory at run-time, which may be useful if you have run-time
+ * are again available on the $http factory at run-time, which may be useful if you have run-time
* services you wish to be involved in your transformations.
*
* Similarly, to locally override the request/response transforms, augment the