[issue40373] urlunparse does not escape slash (/) for http+unix:// in netloc field

2020-05-25 Thread Tal Einat


Tal Einat  added the comment:

This seems to simply be a misunderstanding: urlunparse() and urlunsplit() 
intentionally do not do any encoding of their components.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40373] urlunparse does not escape slash (/) for http+unix:// in netloc field

2020-05-24 Thread Ido Michael


Change by Ido Michael :


--
nosy: +taleinat

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40373] urlunparse does not escape slash (/) for http+unix:// in netloc field

2020-05-24 Thread Ido Michael


Ido Michael  added the comment:

Did you try using the urllib.urlencode() function? 
Also it's not clear to me what happens if you give the expected string to 
urlunsplit() ? I believe it will keep the format as is, str or URL encoded.

Tal what do you think?

--
nosy: +Ido Michael

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40373] urlunparse does not escape slash (/) for http+unix:// in netloc field

2020-04-23 Thread Марк Коренберг

New submission from Марк Коренберг :

urlunsplit(('http+unix', '\x00qwe/asd', 'def', '', '')) 
  

gives:

'http+unix://\x00qwe/asd/def'

but should:

'http+unix://\x00qwe%2Fasd/def'

see https://github.com/msabramo/requests-unixsocket for examples of such URLs.

Workaround: build URL by hand, like `f'http+unix://{quote(..., safe='')}/'`

--
components: Library (Lib)
messages: 367092
nosy: socketpair
priority: normal
severity: normal
status: open
title: urlunparse does not escape slash (/) for http+unix:// in netloc field
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com