hyperium / http

Rust HTTP types
Apache License 2.0
1.12k stars 283 forks source link

Incorrect largest decimal number #618

Open cloutiertyler opened 11 months ago

cloutiertyler commented 11 months ago

https://github.com/hyperium/http/blob/78e3d37563b0fe83886abffdcd8569117d45fee9/src/header/value.rs#L421|

The comment here states:

// The largest decimal number in 15 digits:
// It wold be 10.pow(15) - 1, but this is a constant
// version.
if num as u64 > 999_999_999_999_999_999 {

However, 999_999_999_999_999_999 is actually 18 digits.