-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
url.join(...)
drops parts of the path if url
does not end with /
#896
Labels
Comments
url.join(...)
drops parts of the pathurl.join(...)
drops parts of the path if url
does not end with /
Workaround: actual = URL(str(first_url_part)+"/").join(second_url_part) |
This looks like correct behavior to me at least. Compare e.g.:
Though some web servers or applications treat paths with or without trailing slashes the same, according to RFC3986 they are not necessarily, and joining them if the path doesn't have a trailing slash indeed has different behavior, similar to what happens in your browser with these relative references. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I'm joining two parts of an URL:
Expected behaviour: The result path is concatenated from the two parts.
Actual behaviour: The result path is concatenated but drops the last part of the first URL if the first URL does not endwith a "/"
To Reproduce
Expected behavior
The last part of the first URL path should not be dropped.
Test Output
Python Version
3.11.0
multidict Version
multidict==6.0.4
yarl Version
yarl==1.9.2
OS
Windows
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: