Skip to content

HttpParameterCodec improperly encodes special characters like '+' and '=' #11058

Description

@gnujeremie

I'm submitting a ...

[x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior
Code exemple

let body = new URLSearchParams();

for (let i in values) {
    body.set(i, values[i]);
}

let options = RequestOptions();
options.headers.append('Content-Type', 'application/x-www-form-urlencoded')
return this.http.post(uri, body, options).then();
[...]

If values[i] has a '+' character in it, then it is replaced by spaces.

Expected/desired behavior
'+' should be sent as any other character.

Please tell us about your environment:

  • Angular version: 2.0.0-rc.5
  • Browser: [all | Chrome XX | Firefox XX | IE XX ]
  • Language: [Typescript]

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions