This repository was archived by the owner on Jan 21, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 24
rework INM/IMS handling for AsyncStaticWebHandler #190
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Owner
|
Good catch! |
Owner
mathieucarbou
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few comments ;-)
Collaborator
Author
Nice! Thanks! |
IMS template must contain GMT timezone, not local - "%a, %d %b %Y %H:%M:%S GMT" create etag based on timestamp + filesize INM header handling should have precedence over IMS
Owner
|
@vortigont : I added a comment here about the etag: #190 (comment) There are still issues regarding the http spec compliance, issues which were already existing before anyway - so worth fixing them also in this PR :-) |
mathieucarbou
approved these changes
Jan 9, 2025
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Have faced some problems where I received wrong 304 replies for static files.
The issue was that if some file generated and written on filesystem before WiFi connects and aqures proper time file's timestamp was about +2 +3 seconds UTC and that could lead to improper 304 replies to the clients that was previously had this file.
So I've added some fixes and improvements
IMS template must contain GMT timezone, not local - "%a, %d %b %Y %H:%M:%S GMT"
server used to reply with local timezone specifier but used GMT time.
create etag header based on timestamp + filesize, it adds a bit of entropy for files which are created soon after boot
INM header handling should have precedence over IMS when checking if content is not modified and since etag already includes timestamp further check could be skipped