Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was 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

Description

@dragosrususv

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions