Skip to content

Commit fd2f492

Browse files
committed
[release/2.1] Do not escape cookie names in lookups
- **Do Not Merge** - undo an important part of #24264 - this is an attempt to demonstrate #29023 - should show test indirect references let most tests keep working
1 parent 3df5da1 commit fd2f492

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

eng/PatchConfig.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Later on, this will be checked using this condition:
7272
Microsoft.AspNetCore.ResponseCompression;
7373
</PackagesInPatch>
7474
</PropertyGroup>
75-
<PropertyGroup Condition=" '$(VersionPrefix)' == '2.1.22' ">
75+
<PropertyGroup Condition=" '$(VersionPrefix)' == '2.1.24' ">
7676
<PackagesInPatch>
7777
Microsoft.AspNetCore.Http;
7878
</PackagesInPatch>

src/Http/Http/src/Internal/RequestCookieCollection.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ internal static RequestCookieCollection ParseInternal(IList<string> values, bool
8888
{
8989
name = Uri.UnescapeDataString(name);
9090
}
91+
9192
var value = Uri.UnescapeDataString(cookie.Value.Value);
9293
store[name] = value;
9394
}
@@ -127,8 +128,8 @@ public bool ContainsKey(string key)
127128
{
128129
return false;
129130
}
130-
return Store.ContainsKey(key)
131-
|| !_enableCookieNameDecoding && Store.ContainsKey(Uri.EscapeDataString(key));
131+
132+
return Store.ContainsKey(key);
132133
}
133134

134135
public bool TryGetValue(string key, out string value)
@@ -139,8 +140,7 @@ public bool TryGetValue(string key, out string value)
139140
return false;
140141
}
141142

142-
return Store.TryGetValue(key, out value)
143-
|| !_enableCookieNameDecoding && Store.TryGetValue(Uri.EscapeDataString(key), out value);
143+
return Store.TryGetValue(key, out value);
144144
}
145145

146146
/// <summary>

0 commit comments

Comments
 (0)