Skip to content

Commit fa8efc9

Browse files
committed
Merge branch 'develop'
2 parents b8f695e + 26b2a93 commit fa8efc9

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/Suave.AspNetCore/HttpContextExtensions.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,16 @@ public static async Task SetResponseFromSuaveResult(this HttpContext context, Ht
118118
var key = header.Item1;
119119
var value = header.Item2;
120120

121-
context.Response.Headers.Add(key, new StringValues(value));
121+
StringValues existingStringValues;
122+
123+
if(!context.Response.Headers.TryGetValue(key, out existingStringValues))
124+
{
125+
context.Response.Headers[key] = new StringValues(value);
126+
}
127+
else
128+
{
129+
context.Response.Headers[key] = StringValues.Concat(existingStringValues, new StringValues(value));
130+
}
122131
}
123132

124133
// Set HTTP body

src/Suave.AspNetCore/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Suave.AspNetCore",
3-
"version": "0.4.0-*",
3+
"version": "0.4.1-*",
44
"description": "Small .NET Core library which provides middleware to run a Suave app (on top of Kestrel) within ASP.NET Core.",
55
"copyright": "Copyright 2016 Dustin Moris Gorski",
66
"authors": [ "Dustin Moris Gorski" ],

0 commit comments

Comments
 (0)