Skip to content

form_urlencoded::ByteSerialize does NOT conform to the URL standard #927

@kaffarell

Description

@kaffarell

As mentioned in the URL Standard here the percent-encode of a bytestream is defined as follows:

To percent-encode after encoding, given an encoding encoding, scalar value string input, a percentEncodeSet, and an optional boolean spaceAsPlus (default false):

On step 5.3.1 the spaceAsPlus parameter is used:

If spaceAsPlus is true and byte is 0x20 (SP), then append U+002B (+) to output and continue.

The issue here is that:

  1. The url crate does NOT have a spaceAsPlus parameter.
  2. The url crate encodes the SPACE character as a '+' per default, although the default behavior should actually be '%20'.

Another issue: #888

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