Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
Bug description:
When given a Windows UNC path,urllib.request.pathname2url() incorrectly generates a URI that begins with four slashes. The correct number is two, seeref1,ref2.
>>>importurllib.request>>>urllib.request.pathname2url(r'\\server\share')'////server/share'
Furthermore, when given an extended UNC path like\\?\unc\server\share,pathname2url() incorrectly generates a URI that begins with only one slash:
>>>urllib.request.pathname2url(r'\\?\unc\server\share')'/server/share'
CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows