Skip to content

Fix header and template parsing to preserve colons in values#329

Merged
jwilder merged 2 commits into
masterfrom
repo-agent/repo-agent/template-and-header-parsing-split-on-every-colon-corrupting-values-that-legitimately-contain
Jun 12, 2026
Merged

Fix header and template parsing to preserve colons in values#329
jwilder merged 2 commits into
masterfrom
repo-agent/repo-agent/template-and-header-parsing-split-on-every-colon-corrupting-values-that-legitimately-contain

Conversation

@jwilder

@jwilder jwilder commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Changes

  • main.go: Replace strings.Split(h, ":") with strings.SplitN(h, ":", 2) in the -wait-http-header parsing block so header values containing additional colons (e.g. Bearer token:part2:part3) are preserved intact. Same fix applied to -template flag parsing.

  • e2e/e2e_test.go: Add TestWaitHTTPHeaderValueWithAdditionalColons regression test that verifies an HTTP header value containing multiple colons is received by the server without truncation.

Verification

go test -v -run TestWaitHTTPHeader ./e2e/

@jwilder jwilder changed the title Template and header parsing split on every colon, corrupting values that legitimately contain ':' Fix header and template parsing to preserve colons in values Jun 12, 2026
@jwilder jwilder merged commit 5663029 into master Jun 12, 2026
12 checks passed
@jwilder jwilder deleted the repo-agent/repo-agent/template-and-header-parsing-split-on-every-colon-corrupting-values-that-legitimately-contain branch June 12, 2026 08:06
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