- Version: master
- Platform: Windows
- Subsystem: url
Parsing a URL without a search part changes its behavior if parseQueryString is set:
> url.parse('http://example.com/', false).search
null
> url.parse('http://example.com/', true).search
''
We should probably change this line
to this
Users most likely will not expect parseQueryString to affect the value of .search.
There was a similar discussion at #9600, but @sam-github and I both think that the behavior discussed there is in fact justifiable.
Is there any justification for this behavior or do we consider this a bug? If we do, I will create a semver-major PR later. (I know that we do not plan to make any big changes to the old url API, but I would personally consider this a bug.)
cc @nodejs/url