pquerna / cachecontrol

Golang HTTP Cache-Control Parser and Interpretation
Apache License 2.0
136 stars 17 forks source link

Do not leak implementation errors #5

Closed mbyczkowski closed 7 years ago

mbyczkowski commented 7 years ago

HTTP requests are bound to have values not conforming to the RFC spec. When that happens it's easier to handle errors when we know it's a bad value in a particular part of Cache-Control header (like with ErrMaxDeltaSeconds) than strconv.ErrSyntax that appeared somewhere during parsing.

pquerna commented 7 years ago

Good fix. Thank you!