You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
URI does not recognize URI authority generally, that is scheme://authority/path and somehow mangles it to a non-hierarchical URNs.
Examples of mishandling:
>>> a = uri.URI("ldap://[2001:db8::7]/c=GB?objectClass?one")
>>> a
URI('ldap://[2001:db8::7]/c=GB?objectClass?one')
>>> a.resolve("/c=NO")
URI('/c=NO') # expected: ldap://[2001:db8::7]/c=NO
>>> a = uri.URI("sftp://example.com/etc/passwd")
>>> a
URI('sftp:example.com/etc/passwd') # expected // to be preserved
>>> a.resolve("/root")
URI('sftp:/root') # expected sftp://example.com/root
>>> a = uri.URI("app://01e36b38-39a4-48b2-88d0-6e82717ee87f/nested/example")
>>> a
URI('app:01e36b38-39a4-48b2-88d0-6e82717ee87f/nested/example') # expected // to be preserved
>>> a.resolve("/folder/")
URI('app:/folder') # Expected app://01e36b38-39a4-48b2-88d0-6e82717ee87f/folder/
Instead there seems to be special handling of a few, selected schemes. This should be treated according to RFC3986 and respect // in the incoming URI, no matter which scheme.
The text was updated successfully, but these errors were encountered:
While the "resolve" method does not correctly handle this case, the division operator does. It ought to correctly resolve this, however. Thanks for reporting! The second case isn't quite as simple.
>>>a=URI('sftp:example.com/etc/passwd'); aURI('sftp:example.com/etc/passwd') # looks right, but this is an illusion>>>a.authority# no host component''
In this particular case, : is insufficient. The sftp scheme defines the following syntax:
The last case is explained by non-URL URI treating everything after the authority part as path. For most URI schemes (e.g. URN, ISBN, etc., etc.) the part after the protocol is protocol-defined and arbitrary.
This'll be bundled in the next release, this week. Available in commit a8718ac. (If you are impatient, you can link this entry_point in your own application; just remember to remove your own registration of it after you update your URI version.)
URI does not recognize URI authority generally, that is
scheme://authority/path
and somehow mangles it to a non-hierarchical URNs.Examples of mishandling:
Instead there seems to be special handling of a few, selected schemes. This should be treated according to RFC3986 and respect
//
in the incoming URI, no matter which scheme.The text was updated successfully, but these errors were encountered: