HomeSoftware Heritage

dumb: Fix regression when joining URLs

Description

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.

Details

Provenance
anlambertAuthored on Jan 11 2022, 3:48 PM
anlambertPushed on Jan 11 2022, 4:35 PM
Differential Revision
D6917: dumb: Fix regression when joining URLs
Parents
rDLDGdb5b80b47cbe: Disable hardcoding the TCP transport on GitHub
Branches
Unknown
Tags
Unknown
References
tag: v1.3.1
Build Status
Buildable 25938
Build 40536: test-and-buildJenkins console · Jenkins