http-rs / http-types

Common types for HTTP operations
https://docs.rs/http-types
Apache License 2.0
200 stars 83 forks source link

headers: etag: reject invalid characters #233

Closed ririsoft closed 4 years ago

ririsoft commented 4 years ago

rfc7232 specifies a valid set of ASCII characters that etag headers should match.

This PR is adding the missing character validation. Some similar implementation can be found in Go for instance.

ririsoft commented 4 years ago

I see that the clippy fix is also submitted via #234 . I will then wait for it to be merged and rebase this PR on it if you agree.

Fishrock123 commented 4 years ago

@ririsoft I have merged the clippy fixes.