From a9f2c937df2e419c011a33220bdfe64f2516eb55 Mon Sep 17 00:00:00 2001 From: Ajay Bhargav Baaskaran Date: Wed, 15 Apr 2015 11:50:11 -0700 Subject: [PATCH] React to Cookie changes --- test/Microsoft.AspNet.Mvc.FunctionalTests/TempDataTest.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/TempDataTest.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/TempDataTest.cs index 001014e54e..39a625ef1f 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/TempDataTest.cs +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/TempDataTest.cs @@ -3,11 +3,13 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Net; using System.Net.Http; using System.Threading.Tasks; using Microsoft.AspNet.Builder; using Microsoft.Framework.DependencyInjection; +using Microsoft.Net.Http.Headers; using Xunit; namespace Microsoft.AspNet.Mvc.FunctionalTests @@ -146,7 +148,8 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests IEnumerable 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;