title: Can't set "Content-Type" in my generic handler
body: <p>I have a very simple <strong>Generic Handler</strong>, which sends a simple alert to the client. I set the <code>Content-Type</code> header to be <code>application/x-javascript</code>, but what I get from server is a <code>text/html</code> content type.</p>
  
  <p>Here is the code of my generic handler:</p>
  
  <pre><code>public void ProcessRequest(HttpContext context)
  {
      context.Response.Clear();
      context.Response.AddHeader("Content-Type", "application/x-javascript");
      context.Response.ContentType = "application/x-javascript";
      context.Response.Write("alert('javascript is here');");
      context.Response.Flush();
      context.Response.End();
  }
  </code></pre>
  
  <p>Now, when I call this handler, via <code>http://domain/path/handler.ashx</code>, what I get in Firebug is:</p>
  
  <p><img src="https://i.stack.imgur.com/WWkiB.png" alt="enter image description here"></p>
  
  <p>Any idea what's wrong?</p>
  
  <p><strong>PS:</strong> I want to create a script delivery service, and the script is authored on the fly. That's why I use a dynamic generic handler to serve this script.</p>