Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

Make cookies return null when the key doesn't exist. #462

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Microsoft.AspNet.Http/RequestCookieCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ public string this[string key]

if (Store == null)
{
return string.Empty;
return null;
}

string value;
if (TryGetValue(key, out value))
{
return value;
}
return string.Empty;
return null;
}
}

Expand Down Expand Up @@ -232,4 +232,4 @@ public void Reset()
}
}
}
}
}