Only now I noticed that not only .css files, but all files from /static 
folder are served with *text/css* headers for Content-Type. So I started to 
search why, rewritten all files in *gluon* folder with original source 
files, and recreated the main problem by doing this. Apparently, for some 
reason *streamer.pyc* was not updating on Apache restart earlier (may be 
because I put new *streamer.py* file through Radmin...).

So, the change I did in *streamer.py* earlier (line 68: 
*headers.setdefault('Content-Type', 
'text/css') *) was working from *streamer.pyc *file all this time serving 
all static files with *text/css *headers. Now I`m deleting .pyc file also 
when doing changes.
Now its like this:
1. If I set line 68 to original code, then I have problem with .css files 
headers messed up, like described earlier. 
I used logging of headers from *http.py* and see no anomalies. In log file 
all headers look OK, but in a client browser they messed up for .css files.

2. If I set line 68 to *headers.setdefault('Content-Type', 'text/css'), *then 
all files from static folder have *text/css *headers for Content-Type. 
Which actually fixes my problem as a side-effect, because it looks like 
browsers display images and use .js files just fine with *text/css *headers. 
Only in Opera, images are displayed, but not behave like images on right 
click.

Basically problem still exists. I go around it using 
*headers.setdefault('Content-Type', 
'text/css')* hack in *streamer.py *file. With original *streamer.py *file - 
*http.py *has right headers in *rheaders *variable, but client receives 
messed up headers for .css files. 

Also I tried Twisted server through anyserver,py, - no problem with .css 
files at all. So I want to think its Apache, but why hack in *streamer.py *file 
"fixes" it then?

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to