Hi there 馃憢馃檪
I noticed that when I modify a file served by DocumentRoot, I have to force the refresh in my browser to actually see the updated file.
After some debugging, I think there is an inversion in the order of comparison:
https://github.com/amphp/http-server-static-content/blob/2.x/src/DocumentRoot.php#L304C49-L304C66
The code returns "unmodified" status if $mtime > $ifModifiedSince, but if I understand correctly it's the opposite, if $mtime > $ifModifiedSince it means that the file has been updated. (Corresponding doc for reference)
I'm currently running version 1, but as far as I can see the bug is present on branch 2 as well.
It doesn't seem to be covered by tests.
By the way, thank you very much for your work on this awesome library 馃槉
Hi there 馃憢馃檪
I noticed that when I modify a file served by
DocumentRoot, I have to force the refresh in my browser to actually see the updated file.After some debugging, I think there is an inversion in the order of comparison:
https://github.com/amphp/http-server-static-content/blob/2.x/src/DocumentRoot.php#L304C49-L304C66
The code returns "unmodified" status if
$mtime > $ifModifiedSince, but if I understand correctly it's the opposite, if$mtime > $ifModifiedSinceit means that the file has been updated. (Corresponding doc for reference)I'm currently running version
1, but as far as I can see the bug is present on branch2as well.It doesn't seem to be covered by tests.
By the way, thank you very much for your work on this awesome library 馃槉