Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

fix($http): question mark added to URL if params are empty #6343

Closed
dragosrususv opened this issue Feb 19, 2014 · 4 comments
Closed

fix($http): question mark added to URL if params are empty #6343

dragosrususv opened this issue Feb 19, 2014 · 4 comments

Comments

@dragosrususv
Copy link

STEPS

  1. Create a request using $http service and provide: a) an URL without any params nor question mark b) an empty params set {} (people fallback to some sort of default to avoid errors)

ACTUAL: Notice in developer tools the URL has actually a question mark in it

EXPECTED: As long as we don't have an iterable array/object with a length bigger or equal to 1, we should not affect the URL.

Source code: https://github.com/angular/angular.js/blob/master/src/ng/http.js#L1013-L1029 (please note the first line from buildURL: "if (!params) return url;") ).

originally noticed by Marius Radvan.

@bramslob
Copy link

there is already (at least one..) a pull request for that: #6342

@dragosrususv
Copy link
Author

Sorry, missed that, please CLOSE this one.

@bramslob
Copy link

since you opened it, you could close it. Or wait for the devs.

@tbosch tbosch self-assigned this Feb 21, 2014
@tbosch
Copy link
Contributor

tbosch commented Feb 21, 2014

Closing as requested...

@tbosch tbosch closed this as completed Feb 21, 2014
@tbosch tbosch removed their assignment Feb 21, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants