Staging instance, all changes can be removed at any time

Skip to content

dumb: Fix regression when joining URLs

urljoin does not produce the same output if the base URL does not have a trailing slash.

>>> from urllib.parse import urljoin
>>> urljoin("https://git.example.org/repo", "info/refs")
'https://git.example.org/info/refs'
>>> urljoin("https://git.example.org/repo/", "info/refs")
'https://git.example.org/repo/info/refs'

So ensure the base URL ends with a slash to avoid generating invalid URLs and make loading failed.

Test Plan

Tests have been updated to cover that case.


Migrated from D6917 (view on Phabricator)

Merge request reports

Loading