furl icon indicating copy to clipboard operation
furl copied to clipboard

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

Open gruns opened this issue 4 years ago • 0 comments

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'

gruns avatar Apr 07 '21 16:04 gruns