Fix MapPath and UsePathBase's use of implicit PathStrings #41215
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.
Fixes #41168
An async state machine optimization was made in MapPath and UsePathBase for 6.0 that accidentally changed the field type for paths from PathString to string. There's an implicit converter between the types, but it encodes/decodes the string. This can result in double encoding or decoding.
56d0f2a#diff-65457624537493466dc6a9609fb01fcb49e5f17e687b04827aa4231daf44c5d6R67
Fix: Make sure the path fields are consistently passed as PathStrings to avoid unnecessary transformations.
Recommended for servicing once this is verified in main.