question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Equal sign is added to end of empty query string variable

See original GitHub issue
> normalize_url('example.com/?a');
http://example.com/?a=

> (new URL('http://example.com/?a')).toString()
http://example.com/?a

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
mustafa0xcommented, Sep 11, 2020

Thanks for the research @muuvmuuv.

FWIW, this affects my web app since adding = causes a cache-miss.

0reactions
muuvmuuvcommented, Sep 8, 2020

So they seemed to be clear enough in the referenced issues at whatwg. This is the spec and therefore I wouldn’t implement any transformation in normalize-url since it should normalize it TO the spec. What do you think @sindresorhus ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Equals sign (=) added after valueless query string parameters
This issue is caused by how Glass Mapper generates URLs with its UrlBuilder: public override string ToString() { StringBuilder sb = new ...
Read more >
reactjs - Is there any way to remove equal sign at the only key ...
I use the valueless query string parameter, but if I move to another page(routing), the url changed with added new equal sign to...
Read more >
Rewrite as URL adding equals sign to end of url. - Drupal
I believe parse_str() is the wrong function to use, because it does not distinguish between valueless query parameters ( ?foo ) and query ......
Read more >
Formulas—ArcGIS Survey123 | Documentation
The min() and max() functions complete and ignore any empty strings. An empty text answer is equal to another empty text answer and...
Read more >
Blank, Coalesce, IsBlank, and IsEmpty functions in Power Apps
Empty string refers to a string that contains no characters. The Len function returns zero for such a string and it can be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found