Skip to content

Consider adding strict parsing as an option #7

Description

@mbyczkowski

I've been dealing with some parsing issues as some servers don't conform to HTTP Caching spec. Since the error vars are exported I could I just handle it in my code, but it seems to me that having something like this:

cachecontrol.CachableResponse(req, res, cachecontrol.Options{StrictParsing: false})

would be pretty beneficial. Then, these are errors could be ignored and defaults would be assumed for the fields:

ErrQuoteMismatch
ErrMaxAgeDeltaSeconds 
ErrMaxStaleDeltaSeconds
ErrMinFreshDeltaSeconds
ErrNoCacheNoArgs
ErrNoStoreNoArgs
ErrNoTransformNoArgs
ErrOnlyIfCachedNoArgs
ErrMustRevalidateNoArgs
ErrPublicNoArgs
ErrProxyRevalidateNoArgs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions