httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Simon <>
Subject Re: [users@httpd] Header set Content-type
Date Mon, 11 Jun 2007 14:04:28 GMT
> > 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
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

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:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message