React to Cookie changes
This commit is contained in:
parent
bee20973c7
commit
a9f2c937df
|
|
@ -3,11 +3,13 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNet.Builder;
|
using Microsoft.AspNet.Builder;
|
||||||
using Microsoft.Framework.DependencyInjection;
|
using Microsoft.Framework.DependencyInjection;
|
||||||
|
using Microsoft.Net.Http.Headers;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace Microsoft.AspNet.Mvc.FunctionalTests
|
namespace Microsoft.AspNet.Mvc.FunctionalTests
|
||||||
|
|
@ -146,7 +148,8 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests
|
||||||
IEnumerable<string> values;
|
IEnumerable<string> values;
|
||||||
if (response.Headers.TryGetValues("Set-Cookie", out values))
|
if (response.Headers.TryGetValues("Set-Cookie", out values))
|
||||||
{
|
{
|
||||||
request.Headers.Add("Cookie", values);
|
var cookie = SetCookieHeaderValue.ParseList(values.ToList()).First();
|
||||||
|
request.Headers.Add("Cookie", new CookieHeaderValue(cookie.Name, cookie.Value).ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
return request;
|
return request;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue