Skip to content

Account for coalesced Trailer headers#167

Merged
ojarjur merged 1 commit into
google:masterfrom
nicholashusin:master
Jun 29, 2026
Merged

Account for coalesced Trailer headers#167
ojarjur merged 1 commit into
google:masterfrom
nicholashusin:master

Conversation

@nicholashusin

Copy link
Copy Markdown
Contributor

The current code assumes that all Trailer headers will be sent as separate values, such as:

Trailer: A
Trailer: B

which translates to map[string][]string{"Trailer": []string{"A", "B"}}. In reality, however, the code in this CL utilizes httputil.ReverseProxy, which coalesce the Trailer headers into one line:

Trailer: A, B

which translates to map[string][]string{"Trailer": []string{"A, B"}}.

Fix this issue by making sure that coalesced comma-separated Trailer headers are also handled properly.

The current code assumes that all Trailer headers will be sent as
separate values, such as:

```
Trailer: A
Trailer: B
```

which translates to `map[string][]string{"Trailer": []string{"A",
"B"}}`. In reality, however, the code in this CL utilizes
`httputil.ReverseProxy`, which coalesce the Trailer headers into one
line:

```
Trailer: A, B
```

which translates to `map[string][]string{"Trailer": []string{"A, B"}}`.

Fix this issue by making sure that coalesced comma-separated Trailer
headers are also handled properly.
@ojarjur ojarjur merged commit 4d145b1 into google:master Jun 29, 2026
8 checks passed
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.

2 participants