Update cookie name
This commit is contained in:
parent
6412a14502
commit
7c8be4d8e3
|
|
@ -2,11 +2,8 @@
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Globalization;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.Extensions.Globalization;
|
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Localization
|
namespace Microsoft.AspNetCore.Localization
|
||||||
{
|
{
|
||||||
|
|
@ -20,9 +17,9 @@ namespace Microsoft.AspNetCore.Localization
|
||||||
private static readonly string _uiCulturePrefix = "uic=";
|
private static readonly string _uiCulturePrefix = "uic=";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represent the default cookie name used to track the user's preferred culture information, which is "ASPNET_CULTURE".
|
/// Represent the default cookie name used to track the user's preferred culture information, which is ".AspNetCore.Culture".
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly string DefaultCookieName = "ASPNET_CULTURE";
|
public static readonly string DefaultCookieName = ".AspNetCore.Culture";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The name of the cookie that contains the user's preferred culture information.
|
/// The name of the cookie that contains the user's preferred culture information.
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ namespace Microsoft.AspNetCore.Localization.FunctionalTests
|
||||||
{
|
{
|
||||||
var deploymentResult = deployer.Deploy();
|
var deploymentResult = deployer.Deploy();
|
||||||
|
|
||||||
var cookie = new Cookie("ASPNET_CULTURE", "c=" + locale + "|uic=" + locale);
|
var cookie = new Cookie(CookieRequestCultureProvider.DefaultCookieName, "c=" + locale + "|uic=" + locale);
|
||||||
var cookieContainer = new CookieContainer();
|
var cookieContainer = new CookieContainer();
|
||||||
cookieContainer.Add(new Uri(deploymentResult.ApplicationBaseUri), cookie);
|
cookieContainer.Add(new Uri(deploymentResult.ApplicationBaseUri), cookie);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
"warningsAsErrors": true
|
"warningsAsErrors": true
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"Microsoft.AspNetCore.Localization": "1.0.0-*",
|
||||||
"Microsoft.AspNetCore.Server.Testing": "1.0.0-*",
|
"Microsoft.AspNetCore.Server.Testing": "1.0.0-*",
|
||||||
"Microsoft.Extensions.Logging": "1.0.0-*",
|
"Microsoft.Extensions.Logging": "1.0.0-*",
|
||||||
"Microsoft.Extensions.Logging.Console": "1.0.0-*",
|
"Microsoft.Extensions.Logging.Console": "1.0.0-*",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue