<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Thanks, that works, but it doesn't
      really sound like a solution, more like a workaround.<br>
      <br>
      Tom<br>
      <br>
      <br>
      Op 10/24/12 5:04 AM, Wandenberg Peixoto schreef:<br>
    </div>
    <blockquote
cite="mid:CAFXmt0VrF9VOCYObpn+p8f_TeG65nxcwUxNg_DqnuoNOcPZZuA@mail.gmail.com"
      type="cite">Try to set<br>
      <br>
      default_type    text/javascript;<br>
      <br>
      instead of add_header.<br>
      <br>
      Regards,<br>
      Wandenberg<br>
      <br>
      <div class="gmail_quote">On Tue, Oct 23, 2012 at 9:50 PM, Tom van
        der Woerdt <span dir="ltr"><<a moz-do-not-send="true"
            href="mailto:info@tvdw.eu" target="_blank">info@tvdw.eu</a>></span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
          <br>
          I'm using nginx' locations to serve a javascript file on
          '/client' :<br>
          <br>
              location = /client {<br>
                  expires epoch;<br>
                  alias /path/to/a/file.js;<br>
              }<br>
          <br>
          Works fine, with one major exception: it gets an octet-stream
          Content-Type header. I tried to solve this with :<br>
          <br>
                  add_header Content-Type text/javascript;<br>
          <br>
          Now I get two Content-Type headers.<br>
          <br>
          The raw response:<br>
          <br>
          < HTTP/1.1 200 OK<br>
          < Server: nginx/1.3.6<br>
          < Date: Tue, 23 Oct 2012 23:42:27 GMT<br>
          < Content-Type: application/octet-stream<br>
          < Content-Length: 23245<br>
          < Last-Modified: Sat, 20 Oct 2012 00:09:12 GMT<br>
          < Connection: keep-alive<br>
          < ETag: "5081eba8-5acd"<br>
          < Expires: Thu, 01 Jan 1970 00:00:01 GMT<br>
          < Cache-Control: no-cache<br>
          < Content-Type: text/javascript<br>
          < Accept-Ranges: bytes<br>
          <br>
          nginx information :<br>
          <br>
          nginx version: nginx/1.3.6<br>
          built by gcc 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC)<br>
          TLS SNI support enabled<br>
          configure arguments: --user=nginx --group=nginx
          --with-http_ssl_module --with-http_gzip_static_module
          --with-http_secure_link_module --with-http_realip_module
          --with-http_stub_status_module --with-ipv6
          --with-openssl=/root/libraries/openssl-1.0.1c/
          --prefix=/etc/nginx/ --sbin-path=/usr/sbin/nginx
          --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log
          --http-log-path=/var/log/nginx/access.log
          --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock
          --http-client-body-temp-path=/var/cache/nginx/client_temp
          --http-proxy-temp-path=/var/cache/nginx/proxy_temp
          --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp
          --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp
          --http-scgi-temp-path=/var/cache/nginx/scgi_temp<br>
          <br>
          Server information :<br>
          <br>
          Linux hostname.goes.here 2.6.32-279.5.2.el6.centos.plus.i686
          #1 SMP Thu Aug 23 22:13:33 UTC 2012 i686 i686 i386 GNU/Linux<br>
          <br>
          It's not a major issue for me (browsers will accept
          octet-stream just fine) but might be annoying for other
          people, should they ever run into this.<br>
          <br>
          Tom<br>
          <br>
          _______________________________________________<br>
          nginx-devel mailing list<br>
          <a moz-do-not-send="true" href="mailto:nginx-devel@nginx.org"
            target="_blank">nginx-devel@nginx.org</a><br>
          <a moz-do-not-send="true"
            href="http://mailman.nginx.org/mailman/listinfo/nginx-devel"
            target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx-devel</a><br>
        </blockquote>
      </div>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
nginx-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:nginx-devel@nginx.org">nginx-devel@nginx.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.nginx.org/mailman/listinfo/nginx-devel">http://mailman.nginx.org/mailman/listinfo/nginx-devel</a></pre>
    </blockquote>
    <br>
  </body>
</html>