Skip to content

Do not percent-encode '+' in classpath-jar manifest Class-Path entries#358

Open
mgalindo-sc wants to merge 1 commit into
bazelbuild:masterfrom
mgalindo-sc:patch-1
Open

Do not percent-encode '+' in classpath-jar manifest Class-Path entries#358
mgalindo-sc wants to merge 1 commit into
bazelbuild:masterfrom
mgalindo-sc:patch-1

Conversation

@mgalindo-sc

Copy link
Copy Markdown

Add '+' to the allowed character class so it passes through literally.

The java stub template packs over-long classpaths into a classpath jar whose manifest Class-Path entries percent-encode any character outside [-_.~/a-zA-Z0-9]. Bzlmod canonical repository names put '+' into every external-repo classpath entry, so those entries now contain "%2b" sequences. '+' is a valid URI path character and needs no encoding, and the "%2b" breaks consumers that pass classpath URLs through printf-style formatting

Add '+' to the allowed character class so it passes through literally.

The java stub template packs over-long classpaths into a classpath jar whose manifest Class-Path entries percent-encode any character outside [-_.~/a-zA-Z0-9]. Bzlmod canonical repository names put '+' into every external-repo classpath entry, so those entries now contain "%2b" sequences. '+' is a valid URI path character and needs no encoding, and the "%2b" breaks consumers that pass classpath URLs through printf-style formatting
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

Successfully merging this pull request may close these issues.

1 participant