Skip to content

LWS in H1 header values may be stripped out when proxying. #10270

@antoniovicente

Description

@antoniovicente

The code to strip out whitespace at the beginning and end of H1 header values is a bit too aggressive. It strips out spaces at the beginning and end of each chunk provided by the H1 parser to ConnectionImpl::onHeaderValue. Those chunks roughly map to either buffer slices or readv boundaries.

Sample request that reproduces the issue:

GET / HTTP/1.1
host: foo.com
k: v <32kb of spaces> v

Proxied request:
GET / HTTP/1.1
host: foo.com
k: vv

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions