Page MenuHomeSoftware Heritage

golang: Ensure to case-encode URLs for retrieving package info
ClosedPublic

Authored by anlambert on Sep 16 2022, 1:49 PM.

Details

Summary

When a go package name contains uppercase characters in it, associated
goproxy URLs need to be case-encoded by replacing every uppercase letter
with an exclamation mark followed by the corresponding lower-case letter.

This fixes the loading of such packages.

See https://go.dev/ref/mod#goproxy-protocol.

Diff Detail

Repository
rDLDBASE Generic VCS/Package Loader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D8496 (id=30592)

Rebasing onto 134087342b...

Current branch diff-target is up to date.
Changes applied before test
commit b453eb288eb8af5c7d82e108ba4993c7ba7e2bd3
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Sep 16 13:45:13 2022 +0200

    golang: Ensure to case-encode URLs for retrieving package info
    
    When a go package name contains uppercase characters in it, associated
    goproxy URLs need to be case-encoded by replacing every uppercase letter
    with an exclamation mark followed by the corresponding lower-case letter.
    
    This fixes the loading of such packages.
    
    See https://go.dev/ref/mod#goproxy-protocol.

See https://jenkins.softwareheritage.org/job/DLDBASE/job/tests-on-diff/871/ for more details.

This revision is now accepted and ready to land.Sep 18 2022, 2:09 PM

Rebase and update commit message

Build is green

Patch application report for D8496 (id=30608)

Rebasing onto 134087342b...

Current branch diff-target is up to date.
Changes applied before test
commit 0c599bdc81e3f8482ae4e3103824df7e3f19b930
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Sep 16 13:45:13 2022 +0200

    golang: Ensure to case-encode URLs for retrieving package info
    
    When a go package name contains uppercase characters in it, associated
    goproxy URLs need to be case-encoded by replacing every uppercase letter
    with an exclamation mark followed by the corresponding lower-case letter.
    
    This fixes the loading of such packages.
    
    See https://go.dev/ref/mod#goproxy-protocol.
    
    Related to T4124

See https://jenkins.softwareheritage.org/job/DLDBASE/job/tests-on-diff/873/ for more details.