seanmonstar / httparse

A push parser for the HTTP 1.x protocol in Rust.
https://docs.rs/httparse
Apache License 2.0
569 stars 110 forks source link

Print Header value as string if it's UTF-8 #99

Closed Thomasdezeeuw closed 2 years ago

Thomasdezeeuw commented 3 years ago

Rather then looking at a slice of bytes is easier (for most humans) to read a string. Since most, but not all, header values are strings attempt to create a string from the header value and print that, falling back to printing it a slice of bytes if the value is not a valid UTF-8 string.

Thomasdezeeuw commented 2 years ago

Ping @seanmonstar.

nox commented 2 years ago

@Thomasdezeeuw Could you force push to trigger the CI again?

Thomasdezeeuw commented 2 years ago

@nox also rebase on master.