gruns / furl

🌐 URL parsing and manipulation made easy.
Other
2.63k stars 152 forks source link

default port not properly removed with set(netloc=None) and weird interaction with set(scheme=None) #143

Open gruns opened 3 years ago

gruns commented 3 years ago

ex:

>>> f = furl('https://www.google.com/hello')
>>> f.copy().set(scheme=None, netloc=None).url
'//:443/hello/'

vs

>>> f = furl('https://www.google.com/hello')
>>> f.copy().set(scheme=None).set(netloc=None).url
'/hello'

and oddity with .set(scheme=None)

>>> f = furl('https://www.google.com:999/hello')
>>> f.copy().set(scheme=None, netloc=None).url
'//:443/hello'