Re: How to force the content-type of each response?

"Jonathan Ellis" <[email protected]> Thu, 26 Apr 2007 09:37:16 -0700
Newsgroups gmane.comp.python.spyce.general
Message-ID <[email protected]>
Hmm.  I think the right solution is to add a hook to have custom Spyce
modules loaded for each request, like the builtin response request etc.
modules.  Then you could create a very short module that just did a
response.setContentType().

Try that with 1354.  append the module name (as a string) to
globalmodules in your config.py.

On Thu, 26 Apr 2007 12:21:17 -0400, "Philip Semanchuk"
<[email protected]> said:
> Hi all,
> This seems like a simple question, but I can't figure out how to do it. 
> I have Spyce proxied behind Apache. With each response I would like to 
> send this header:
>    Content-Type: text/html; charset=utf-8
> 
> I realize that I can accomplish this with a custom tag that will call 
> response.setContentType() but that only works if I remember to include 
> the tag on each page. Is there any way to customize headers via 
> spyceconf.py? Or via Apache config? My Apache-fu is pretty weak and I'm 
> not sure one can get Apache to add headers to a response once 
> responsibility for the response has been handed over to a proxy.
> 
> 
> Thanks
> Philip
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Spyce-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/spyce-users

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/