Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
marco2216 opened this issue Jan 31, 2023 · 10 comments · May be fixed by #38
Open

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

marco2216 opened this issue Jan 31, 2023 · 10 comments · May be fixed by #38
Assignees
Labels

Comments

@marco2216
Copy link

marco2216 commented Jan 31, 2023

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.

@dougwilson
Copy link
Contributor

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

@dougwilson dougwilson changed the title If-Modified-Since is not ignored if request contains If-None-Match Update for RFC 9110, If-Modified-Since is not ignored if request contains If-None-Match Jan 31, 2023
@marco2216
Copy link
Author

I think it was?
image

@dougwilson dougwilson changed the title Update for RFC 9110, If-Modified-Since is not ignored if request contains If-None-Match If-Modified-Since is not ignored if request contains If-None-Match Jan 31, 2023
@dougwilson
Copy link
Contributor

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.

@dougwilson dougwilson self-assigned this Jan 31, 2023
@dougwilson dougwilson added the bug label Jan 31, 2023
@marco2216
Copy link
Author

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

@dougwilson
Copy link
Contributor

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.

@marco2216
Copy link
Author

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

@bigbigDreamer
Copy link

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

@dougwilson
Copy link
Contributor

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.

@UlisesGascon
Copy link
Member

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 :)

@bigbigDreamer
Copy link

bigbigDreamer commented Apr 29, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants