Re: Header set Content-type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > Is it impossible to set the Content-Type? Any suggestions?
> 
> It is impossible to set Content-Type using mod_headers. All the
> standard HTTP protocol headers are controlled by the apache core and
> can't be overriden with mod_headers.
> 
> But you can set Content-Type using any of the standard apache
> content-type-controlling directives. In your case, you can simply use
> the T= flag to mod_rewrite, which is much more direct anyway.
>

I set the T= flag. In the rewrite log I see the flag doing it's thing: 

...rewrite index.php -> /sesp/static/cache/sesp-apprv.csv
...remember /sesp/static/cache/sesp-apprv.csv to have MIME-type 'application/ms-excel'

but Content-Type comes back as text/plain instead of application/ms-excel. I'm wondering if the
PT flag is causing other modules to override the T= flag. What do you think?

RewriteRule (index.php|^)$ %{ENV:SESP_LOC}/static/cache/sesp-apprv.csv
[T=application/ms-excel,PT,L]

At this point, I'm thinking, leave the content type as the default text/plain. Let the browsers
 handle content-disposition "attachment; filename=sesp-apprv.csv" as they see fit ;-)


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux