zkat / make-fetch-happen

Get in loser, we're making requests!
Other
384 stars 27 forks source link

headers to lower case for conditional requests #47

Closed arve0 closed 7 years ago

arve0 commented 7 years ago

fixes issue #46

arve0 commented 7 years ago

I have not grokked the tests, so maybe someone can help with that.

zkat commented 7 years ago

Hey! Thanks for looking into this bug and sending a patch! I haven't had time to figure out just what is going on yet, but just skimming, I'm afraid of this maybe just papering over a case-sensitivity but in https://npm.im/http-cache-semantics, which is likely where those comparisons are actually happening.

arve0 commented 7 years ago

Yes, you are correct. Call stack is

CachePolicy._varyMatches(req)
CachePolicy._requestMatches(incomingReq, true)
CachePolicy.revalidationHeaders(_req)
makeFetchHappen.conditionalFetch(req, res, opts)

I'll open an issue on http-cache-semantics.