Skip to content

Extra / added when building url #1734

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

Closed
mavwolverine opened this issue Jun 11, 2025 · 1 comment
Closed

Extra / added when building url #1734

mavwolverine opened this issue Jun 11, 2025 · 1 comment

Comments

@mavwolverine
Copy link

http_url = HttpUrl('http://test.com/abc')
https_url = HttpUrl.build(
            scheme="https",
            host=http_url.host,
            port=http_url.port,
            path=http_url.path,
            query=http_url.query,
            fragment=http_url.fragment,
)

NOTE: This is a simplified example.

The issue is with

url.push('/');

I think it should first check if path starts with / and add only if it does not.

@Viicos
Copy link
Member

Viicos commented Jun 11, 2025

See also #1719.

@Viicos Viicos closed this as completed Jun 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants