title: Force specific casing for known header in ASP.NET Core 2
body: <p>I have an ASP.NET Core 2 app with Kestrel. The app is deployed to AWS Lambda/API Gateway. Everything works as expected except for a small detail that makes all the difference.</p>
  
  <p>Some requests to my app need to issue multiple security-related <code>Set-Cookie</code> headers. Due to the way data are passed between API Gateway and Lambda, duplicate header names are joined together, which renders the <code>Set-Cookie</code> header invalid and the browser refuses to honor it.</p>
  
  <p>A <a href="https://forums.aws.amazon.com/thread.jspa?threadID=205782#jive-message-725953" rel="nofollow noreferrer">suggested solution</a> to overcome this limitation is to use multiple headers names that vary only by casing: <code>Set-Cookie</code>, <code>Set-cookie</code>, <code>set-cookie</code>...</p>
  
  <p>I know this is a hacky solution, but if it works it should be good enough while AWS fixes this limitation.</p>
  
  <p>However, when using <code>HttpContext.Response.Headers.Add(name, value)</code>, known header names are normalized and become regular duplicate headers.</p>
  
  <p>Is it possible to go around this normalization mechanism or achieve the end goal in some other way?</p>