-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Labels
area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templates
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
There's an issue with the constructor documentation for RequestLocalizationMiddleware:

Looking at the source code, it seems that line 31 and 32 need to be swapped around.
https://github.com/dotnet/aspnetcore/blob/main/src/Middleware/Localization/src/RequestLocalizationMiddleware.cs
I also noticed there's a null check on lines 138 if (cultureName != null) and 186 if (name == null || supportedCultures == null), however StringSegment is a struct, so it can never be null.
Expected Behavior
No response
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
No response
Anything else?
No response
Metadata
Metadata
Assignees
Labels
area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templates