mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-26 13:05:35 +08:00
fix($http): do not encode special characters @$:, in params
encodeURIComponent is too aggressive and doesn't follow http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path segments so we need this test to make sure that we don't over-encode the params and break stuff like buzz api which uses @self. This is has already been fixed in `$resource`. This commit fixes it in a same way for `$http` as well. BREAKING CHANGE: $http does follow RFC3986 and does not encode special characters like `$@,:` in params. If your application needs to encode these characters, encode them manually, before sending the request.
This commit is contained in:
@@ -118,9 +118,7 @@ describe("resource", function() {
|
||||
});
|
||||
|
||||
|
||||
// In order to get this passed, we need to fix $http - another breaking change,
|
||||
// so I'm gonna submit that as a separate CL.
|
||||
xit('should not encode @ in url params', function() {
|
||||
it('should not encode @ in url params', function() {
|
||||
//encodeURIComponent is too agressive and doesn't follow http://www.ietf.org/rfc/rfc3986.txt
|
||||
//with regards to the character set (pchar) allowed in path segments
|
||||
//so we need this test to make sure that we don't over-encode the params and break stuff like
|
||||
|
||||
Reference in New Issue
Block a user