fix GXVirtualPathCasingModule: scope to GET/HEAD, skip services, emit relative 302#1286
Merged
Merged
Conversation
…t absolute 302 The virtual-path casing canonicalizer ran on every request and issued a RedirectPermanent (301) with a relative Location. Two problems: - A 3xx redirect on a POST downgrades it to GET and drops the body, breaking .svc / REST service calls (observed in IIS trace: POST -> 302 -> GET). - 301 is cached permanently by the browser, a footgun in dev and if the app-path casing ever changes. Now it only canonicalizes idempotent navigations (GET/HEAD), skips service endpoints (.svc/.asmx//rest/) which resolve case-insensitively anyway, and emits an absolute Location (scheme://host + canonical path) via a 302 (Response.Redirect + CompleteRequest, no ThreadAbortException). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Cherry pick to beta success |
Removed comments regarding idempotent navigation and service endpoints.
Contributor
Cherry pick to beta success |
Use the relative canonical path instead of building an absolute URL from the request authority. Still a 302 (Response.Redirect + CompleteRequest), scoped to GET/HEAD and skipping service endpoints. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Cherry pick 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.
Refinement of #1283 — tunes
GXVirtualPathCasingModuleso it doesn't break service calls and emits the sameLocationas the Sustainsys SAML module.The virtual-path casing canonicalizer ran on every request and issued a RedirectPermanent (301) with a relative Location. Two problems:
Now it only canonicalizes idempotent navigations (GET/HEAD), skips service endpoints (.svc/.asmx//rest/) which resolve case-insensitively anyway, and emits an relative Location via a 302 (Response.Redirect + CompleteRequest, no ThreadAbortException).
Issue:208789