Preserve request URL casing in ApplicationPath on .NET Framework#1282
Closed
claudiamurialdo wants to merge 1 commit into
Closed
Preserve request URL casing in ApplicationPath on .NET Framework#1282claudiamurialdo wants to merge 1 commit into
claudiamurialdo wants to merge 1 commit into
Conversation
In .NET Framework, HttpRequest.ApplicationPath returns the path as configured in IIS regardless of the casing the client used in the URL, while .NET Core's PathBase preserves the request casing. Callers like GAM use this value as a cookie Path; since cookie paths are case-sensitive per RFC 6265, a mismatch caused the browser to drop the cookie when the URL casing differed from IIS. GetApplicationPath now returns the matching prefix taken from Request.Url.AbsolutePath, aligning behavior across frameworks. New appSettings flag PreserveApplicationPathCasing (default true) allows reverting to the historical behavior if needed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Collaborator
Cherry pick to beta success |
Collaborator
Author
|
Revert changes: this was resolved differently in #1283 |
Collaborator
Revert to beta success
|
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.
In .NET Framework, HttpRequest.ApplicationPath returns the path as configured in IIS regardless of the casing the client used in the URL, while .NET Core's PathBase preserves the request casing. Callers like GAM use this value as a cookie Path; since cookie paths are case-sensitive per RFC 6265, a mismatch caused the browser to drop the cookie when the URL casing differed from IIS.
GetApplicationPath now returns the matching prefix taken from Request.Url.AbsolutePath, aligning behavior across frameworks. New appSettings flag PreserveApplicationPathCasing (default true) allows reverting to the historical behavior if needed.
Issue:208240