Resolve member function overload ambiguity and incorrect pointer casting for secondsToExpiry HTTP cache - #1309
Draft
uNetworkingAB with Copilot wants to merge 2 commits into
Draft
Resolve member function overload ambiguity and incorrect pointer casting for secondsToExpiry HTTP cache#1309uNetworkingAB with Copilot wants to merge 2 commits into
uNetworkingAB with Copilot wants to merge 2 commits into
Conversation
…e feature Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>
Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
uNetworkingAB
September 13, 2026 09:39
View session
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.
Recently introduced changes to the
secondsToExpirycache feature introduced compilation errors due to overloaded member function name resolution failure and a type safety mismatch during pointer retrieval.Key Changes
Resolve Overload Resolution Ambiguity in
AppWrapper.h&APP::getto the non-cached 2-parameter signaturestatic_cast<APP && (APP::*)(std::string, uWS::MoveOnlyFunction<void(uWS::HttpResponse<SSL> *, uWS::HttpRequest *)> &&)>when fallback-registering standard non-cached GET routes. This prevents the compiler from failing when resolving the overloadedgetmethod introduced byHttpCache.Fix Pointer Type Safety in
HttpResponseWrapper.hgetHttpResponsehelper to cast the underlying instance pointer touWS::HttpCacheResponse *instead ofuWS::HttpResponse<true> *whenPROTOCOL == 3(CACHE). This aligns the static types with the actual instantiated types, preventing undefined behavior and memory mismatches.Code Snippet