sindresorhus / normalize-url

Normalize a URL
MIT License
835 stars 123 forks source link

Add option to normalize custom protocols #179

Open sindresorhus opened 1 year ago

sindresorhus commented 1 year ago

The normalization steps assume HTTP behavior, so it would only work with protocols that are very similar to HTTP.

Kilian commented 1 year ago

In normalize-url@7, normalizing localhost:8000 would result in https://localhost:8000 but because of #178, localhost: is now seen as a protocol. This makes sense, but it's still a bit of an unwanted behavior.

Not creating a new ticket because it's closely related to this, so I hope that the old behavior can be reinstated (with an option or otherwise) while adding a normalize custom protocols option.