jshttp / fresh

HTTP request freshness testing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

If-Modified-Since is not ignored if request contains If-None-Match

marco2216 opened this issue · comments

According to the latest HTTP RFC,

A recipient MUST ignore If-Modified-Since if the request contains an If-None-Match header field; the condition in If-None-Match is considered to be a more accurate replacement for the condition in If-Modified-Since, and the two are only combined for the sake of interoperating with older intermediaries that might not implement If-None-Match.

fresh does not ignore If-Modified-Since, it returns false if the If-Modified-Since is before last-modified. I would expect it to return true immediately if If-None-Match matches the ETag header.

Ah, yes, it looks like this is a new change in the spec, as that requirement was not part of RFC 7232, AFAICT.

I think it was?
image

Oh, you're right. That's why I said as far as I can tell. I guess I assumed it would be in the same section in both RFC, doh.

If you'd like, I could try to create a PR addressing the issue?

Hi @marco2216 you can, though sorry I didn't post yet, just before you go through too much trouble, I did already start on the develop branch a couple hours ago. I just noticed that I need to switch the project over to GH Actions to finish it off, and will just need to wait until after I'm done with work today to work on that since it's more involved.

Oh I see, I'll let you handle it then 👌

Hi, sorry to bother you. May I ask if there has been any progress on this matter, or what the follow-up plan is, or if there is a timeline? @dougwilson

Hi @bigbigDreamer apologies for that! It just got lost in the sea of notifications for me and then fell off more as I got some unrelated security reports I had to triage and working on fixing one of them currently. I think I already pushed up the changeset, so I will get a release made and pushed here.

If you'd like, I could try to create a PR addressing the issue?

Hi @marco2216! Are you still interested in working on this PR? We've completed the migration to GitHub already :)

If you'd like, I could try to create a PR addressing the issue?

Hi @marco2216! Are you still interested in working on this PR? We've completed the migration to GitHub already :)

Hi @UlisesGascon , I fix this, can u help me review #38

image

All tests passed!