-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpCache] fixed if-modified-since header default to an empty string if the last-modified header was not set #34016
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
Conversation
020aae3
to
13b34a7
Compare
Could you please add a test case? |
I thought about adding a test for, but I don't how I would go about testing this particular case |
shouldn't we actually omit the |
I've created this repo from scratch to reproduce it start the server, open the route, after 1 minute or 2 it should throw |
e30f93a
to
d907bb0
Compare
… if the last-modified header was not set
d907bb0
to
c64e5cb
Compare
I'm fine with whichever you guys think is best |
@nicolas-grekas any update on this issue? |
ping! |
Omitting the header looks the best yes in this case. With a test case also :) |
pong @alex2005git :) |
This has been fixed in #34385 already. |
… if the last-modified header was not set
The problem I had with this was that the psr http factory would create the request, and would throw an exception because the null value isn't an allowed header value
https://github.com/symfony/psr-http-message-bridge/blob/8564bf76630423ced21bbbee189947b90677dcde/Factory/PsrHttpFactory.php#L72
https://github.com/Nyholm/psr7/blob/55ff6b76573f5b242554c9775792bd59fb52e11c/src/MessageTrait.php#L180