Skip to content

Ambiguity in documentation of Url::query_pairs() #1078

@apt1002

Description

@apt1002

The documentation for Url::query_pairs() does not make it clear whether the returned values are %-decoded. The docs for Url::query() explicitly say that the returned string is not %-decoded, which might lead the reader to guess the same for Url::query_pairs(), but my testing suggests that in fact query_pairs() does %-decode the returned values.

Observed:

Parse the URL’s query string, if any, as application/x-www-form-urlencoded and return an iterator of (key, value) pairs.

Expected:

Parse and decode the URL’s `application/x-www-form-urlencoded`-encoded query string, if any, and return an iterator of the (key, value) pairs.

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