Skip to content

URL encoding of square brackets is not consistent #2503

@karatakis

Description

@karatakis

Prerequisites

  • I have checked the existing issues to ensure this is not a duplicate.
  • I am running the latest version of Tailcall.

Describe the bug

When URL encoding the following link

/endpoint?bank_account_ids[]=id1&bank_account_ids[]=id2

we receive

/endpoint?bank_account_ids[]=id1&bank_account_ids%5B%5D=id2

Notice the [] for first id it is [] but for the next it is %5B%5D

Steps to reproduce

  1. You can use code provided from this pull request fix(#2489): Modify batchKey logic #2495
  2. Make the following change fix(#2489): Modify batchKey logic #2495 (comment)

Expected behavior

Either all [] are encoded to %5B%5D or all %5B%5D to []

Actual behavior

Notice the [] for first id it is [] but for the next it is %5B%5D

Environment information:

  • Operating System: Linux Mint 21.2
  • Tailcall Version: tailcall 0.1.0-dev
  • Rust Version: rustc 1.79.0
  • GraphQL Client/version tailcall webui

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions