ui: fix ETag truncation with MSVC compiler#23917
Merged
Merged
Conversation
aldehir
approved these changes
May 30, 2026
allozaur
approved these changes
May 30, 2026
Contributor
|
@allozaur seems unrelated to this PR, for example #23913 (comment) also fails. Probably needs to be bisected. |
allozaur
approved these changes
May 31, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Overview
In the process of generating ETags for embedded web UI files, the
uint64_tfile hash is casted into aunsigned longvalue before being converted into a 64-bit hexadecimal string. MSVC compiler uses 32 bitlongvalues, and thus will truncate the hash value. This don't really affect anything (aside for some ridiculous hypothetical load-balancing setup with servers running different OSes), but hey, why do a type cast when you can use the full value just like on Linux?For consistency, type cast on the
size_tvalue above is also removed. I don't really believe we will have 4GB+ of static files, though.Additional information
Tested on Windows 11 with Visual Studio 2026.
Current master:
This PR:
Requirements