title: Duplicate headers received from server
body: <blockquote>
  <p>Duplicate headers received from server</p>
  <p>The response from the server contained duplicate headers. This problem is generally the result of a misconfigured website or proxy. Only the website or proxy administrator can fix this issue.</p>
  <p>Error 349 (net::ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION): Multiple distinct Content-Disposition headers received. This is disallowed to protect against HTTP response splitting attacks.</p>
  </blockquote>
  <p>I found this error while exporting to pdf in chrome.</p>
  <pre><code>Response.Buffer = false;
  Response.ClearHeaders();
  string ext = objProp.PACKAGEFILENAME.Substring(objProp.PACKAGEFILENAME.LastIndexOf(&quot;.&quot;));
  string ext1 = ext.Substring(1);
  Response.ContentType = ext1;
  Response.AddHeader(&quot;Content-Disposition&quot;, &quot;target;_blank,attachment; filename=&quot; + objProp.PACKAGEFILENAME);
  const int ChunkSize = 1024;
  byte[] binary = objProp.PACKAGEDOCUMENT;
  System.IO.MemoryStream ms = new System.IO.MemoryStream(binary);
  int SizeToWrite = ChunkSize;
  
  for (int i = 0; i &lt; binary.GetUpperBound(0) - 1; i = i + ChunkSize)
  {
      if (!Response.IsClientConnected) return;
      if (i + ChunkSize &gt;= binary.Length) SizeToWrite = binary.Length - i;
      byte[] chunk = new byte[SizeToWrite];
      ms.Read(chunk, 0, SizeToWrite);
      Response.BinaryWrite(chunk);
      Response.Flush();
  }
  Response.Close();
  </code></pre>
  <p>How to fix this?</p>