title: System.Net.Http.HttpClient instance throws an exception when setting a comma. Why?
body: <p>Given the following <code>System.Net.Http.HttpClient</code> <code>Portable Class Library</code> throws an exception:</p>
  
  <pre><code>var httpClient = new HttpClient();
  httpClient.DefaultRequestHeaders.Add("Authorization", "aaaa,bbbb");
  </code></pre>
  
  <p>The exception is: <strong>Invalid Format</strong></p>
  
  <blockquote>
    <p>at System.Net.Http.Headers.HttpHeaders.AddInternal (System.String
    name, IEnumerable<code>1 values, System.Net.Http.Headers.HeaderInfo
    headerInfo, Boolean ignoreInvalid) [0x0004c] in
    /Developer/MonoTouch/Source/mono/mcs/class/System.Net.Http/System.Net.Http.Headers/HttpHeaders.cs:195
    at System.Net.Http.Headers.HttpHeaders.Add (System.String name,
    IEnumerable</code>1 values) [0x00011] in
    /Developer/MonoTouch/Source/mono/mcs/class/System.Net.Http/System.Net.Http.Headers/HttpHeaders.cs:170
    at System.Net.Http.Headers.HttpHeaders.Add (System.String name,
    System.String value) [0x00000] in
    /Developer/MonoTouch/Source/mono/mcs/class/System.Net.Http/System.Net.Http.Headers/HttpHeaders
    &lt; ... snip ...></p>
  </blockquote>
  
  <p>Now this only happens under the following</p>
  
  <p>Header key = <code>Authorization</code>. If you change that to anything else, it's ok.
  Value = has to have a comma, in it.</p>
  
  <p>Now, this previous SO question suggests that a comma is the correct way to stick multiple values in the header.</p>
  
  <p>Can anyone explain what is going on?</p>
  
  <p>NOTE: This is on Xamarin, so I guess it's mono. Not sure if that's important.</p>
  
  <p>UPDATE:</p>
  
  <p>here's a pic of it.</p>
  
  <p><img src="https://i.stack.imgur.com/37NIi.png" alt="enter image description here"></p>