Skip to content

account for non ASCII values in the headers or preamble #25

@robotdan

Description

@robotdan

I think we should probably treat these values as opaque instead of throwing out the request.

Specifically in RFC 7230, section 3.2.4

Historically, HTTP has allowed field content with text in the
ISO-8859-1 charset [ISO-8859-1], supporting other charsets only
through use of [RFC2047] encoding. In practice, most HTTP header
field values use only a subset of the US-ASCII charset [USASCII].
Newly defined header fields SHOULD limit their field values to
US-ASCII octets. A recipient SHOULD treat other octets in field
content (obs-text) as opaque data.

So it seems the most appropriate option is to treat them as opaque and allow it. From testing, this looks to be how Netty and Tomcat handle this.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions