|
List Info
Thread: Upgrade to 2.2 - static problems
|
|
| Upgrade to 2.2 - static problems |

|
2006-04-06 08:56:21 |
Hello all,
Yesterday I upgraded to 2.2final, but am suffering some
issues with
static content. Everything was fine with the previous
version.
I am an image and a stylesheet that I wish to use with each
page.
Here are the relevant parts of my config file:
"""
[global]
staticFilter.root =
"n:/sfsu/tools/python/russell/"
[/resources]
staticFilter.on = True
staticFilter.dir = "resources"
"""
When I access any page the stylesheet never loads. The
image behaves
slightly more strangely. The first time the page loads, it
displays.
I refresh the page, it disappears. I refresh again and it
comes
back, and so on.
If I go directly to http://local
host:8080/resources/duck.jpg or
http://loc
alhost:8080/resources/styles.css the files always load.
I have read the documentation and fiddled endlessly with
paths, but I
am afraid to no avail. Can someone offer some advice for
this
probably excessively easy problem?
Thank you for your help,
Russell
The Duck Quacks:
http://www-users.
york.ac.uk/~rb502/ - Homepage
h
ttp://www-users.york.ac.uk/~rb502/blog/quack.shtml -
Blog
http://www.flic
kr.com/photos/lsnduck/ - Photos
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at http://
groups.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Upgrade to 2.2 - static problems |

|
2006-04-06 11:04:12 |
Hello all,
> Yesterday I upgraded to 2.2final, but am suffering some
issues with
> static content. Everything was fine with the previous
version.
I realised the httpauthfilter was also broken by the change
to
_cp_filters and now that I hve fixed that, everything works.
My apologies for wasting everybody's time.
Russell
The Duck Quacks:
http://www-users.
york.ac.uk/~rb502/ - Homepage
h
ttp://www-users.york.ac.uk/~rb502/blog/quack.shtml -
Blog
http://www.flic
kr.com/photos/lsnduck/ - Photos
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at http://
groups.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Upgrade to 2.2 - static problems |

|
2006-04-07 09:00:18 |
Hello again,
>> Yesterday I upgraded to 2.2final, but am suffering
some issues
>> with static content. Everything was fine with the
previous
>> version.
> I realised the httpauthfilter was also broken by the
change to
> _cp_filters and now that I hve fixed that, everything
works.
This morning, upon firing the server up, it didn't work
again. I
can't seem to get httpauthfilter to behave itself. With it
not in
use, static content is served without a hitch. When it is
turned on,
no static content is served. Is there something that I have
to do to
get things to play nicely?
I am using the 30th of December 2005 revision of
httpauthfilter with
CP 2.2final.
Apologies if I have missed something really obvious, it is
rather my
style.
Russell
The Duck Quacks:
http://www-users.
york.ac.uk/~rb502/ - Homepage
h
ttp://www-users.york.ac.uk/~rb502/blog/quack.shtml -
Blog
http://www.flic
kr.com/photos/lsnduck/ - Photos
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at http://
groups.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Upgrade to 2.2 - static problems |

|
2006-04-07 15:08:39 |
Russell Bungay wrote:
> Hello again,
>
>>> Yesterday I upgraded to 2.2final, but am
suffering some issues
>>> with static content. Everything was fine with
the previous
>>> version.
>> I realised the httpauthfilter was also broken by
the change to
>> _cp_filters and now that I hve fixed that,
everything works.
>
> This morning, upon firing the server up, it didn't
work again. I
> can't seem to get httpauthfilter to behave itself.
With it not in
> use, static content is served without a hitch. When it
is turned on,
> no static content is served. Is there something that I
have to do to
> get things to play nicely?
Just taking a quick look at the code for httpauthfilter, I
am not sure
about line 131:
cherrypy.request.execute_main = True
Due to filter order, the staticfilter should have already
ran and set
cherrypy.response.body and cherrypy.response.status. For
the
httpauthfilter to specify that "main" should be
run would mean that CP
is going to try to dispatch to a page handler for the
requested
resource, even though staticfilter handled it already. I
would suspect
that it wouldn't find a page handler and would reset
cherrypy.response.status to 404.
Sylvain: am I missing something?
Russell: if this doesn't help, could you provide a more
detailed
explanation of the problem. Maybe a snippet of your CP
access logs and
any tracebacks.
Christian
http://www.dowski.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at http://
groups.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Upgrade to 2.2 - static problems |

|
2006-04-10 08:37:39 |
Hello,
Sorry for taking so long to reply, I only have internet
access at
work.
>> This morning, upon firing the server up, it didn't
work again. I
>> can't seem to get httpauthfilter to behave itself.
With it not
>> in use, static content is served without a hitch.
When it is
>> turned on, no static content is served. Is there
something that I
>> have to do to get things to play nicely?
> Russell: if this doesn't help, could you provide a
more detailed
> explanation of the problem. Maybe a snippet of your CP
access logs
> and any tracebacks.
I have attached a text file showing events from CP being
started to
me viewing the index page. The content of the page appears
correctly. However the image (/resources/duck.jpg) does not
display
and the css file (/resources/styles.css) is not applied.
If I attempt to go directly to
http://loc
alhost:8080/resources/styles.css I receive:
"""
500 Internal error
The server encountered an unexpected condition which
prevented it
from fulfilling the request.
Page handler: <bound method Russell.default of
<__main__.Russell
instance at 0x00CD1080>>
Traceback (most recent call last):
File
"N:\sfsu\tools\python\movpy\lib\Lib\site-packag
es\cherrypy\_cphttptools.py",
line 106, in _run
File
"N:\sfsu\tools\python\movpy\lib\Lib\site-packag
es\cherrypy\_cphttptools.py",
line 255, in main
TypeError: default() takes exactly 1 argument (3 given)
"""
If I comment out default, all of the errors are 404s.
Thank you for any advice you may have.
Russell
The Duck Quacks:
http://www-users.
york.ac.uk/~rb502/ - Homepage
h
ttp://www-users.york.ac.uk/~rb502/blog/quack.shtml -
Blog
http://www.flic
kr.com/photos/lsnduck/ - Photos
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at http://
groups.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---
C:\Documents and
Settings\rb502\Desktop>n:/sfsu/tools/python/movpy/movpy
.exe n:/sfsu/tools/python/russell/russell.py
10/Apr/2006:08:48:25 CONFIG INFO Server parameters:
10/Apr/2006:08:48:25 CONFIG INFO server.environment:
production
10/Apr/2006:08:48:25 CONFIG INFO server.log_to_screen:
True
10/Apr/2006:08:48:25 CONFIG INFO server.log_file:
10/Apr/2006:08:48:25 CONFIG INFO server.log_tracebacks:
True
10/Apr/2006:08:48:25 CONFIG INFO
server.log_request_headers: False
10/Apr/2006:08:48:25 CONFIG INFO server.protocol_version:
HTTP/1.0
10/Apr/2006:08:48:25 CONFIG INFO server.socket_host:
10/Apr/2006:08:48:25 CONFIG INFO server.socket_port: 8080
10/Apr/2006:08:48:25 CONFIG INFO server.socket_file:
10/Apr/2006:08:48:25 CONFIG INFO server.reverse_dns: False
10/Apr/2006:08:48:25 CONFIG INFO server.socket_queue_size:
5
10/Apr/2006:08:48:25 CONFIG INFO server.thread_pool: 10
10/Apr/2006:08:48:27 HTTP INFO Serving HTTP on http://localhost:8080/
127.0.0.1 - - [10/Apr/2006:09:05:58] "GET /
HTTP/1.1" 401 42 "" "Mozilla/5.0
(Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111
Firefox/1.5"
127.0.0.1 - - [10/Apr/2006:09:06:03] "GET /
HTTP/1.1" 200 3107 """Mozilla/5.0
(Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111
Firefox/1.5"10/Apr/2006:09:06:04 HTTP INFO Page
handler: <bound method Russell.default of
<__main__.Russell instance at 0x00CD1080>>
Traceback (most recent call last):
File
"N:\sfsu\tools\python\movpy\lib\Lib\site-packag
es\cherrypy\_cphttptools.py", line 106, in _run
File
"N:\sfsu\tools\python\movpy\lib\Lib\site-packag
es\cherrypy\_cphttptools.py", line 255, in main
TypeError: default() takes exactly 1 argument (3 given)
127.0.0.1 - - [10/Apr/2006:09:06:04] "GET
/resources/styles.css HTTP/1.1" 500 1188 "http://localhost:8080/&qu
ot; "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
rv:1.8) Gecko/20051111 Firefox/1.5"
10/Apr/2006:09:06:04 HTTP INFO Page handler: <bound
method Russell.default of <__main__.Russell instance at
0x00CD1080>>
Traceback (most recent call last):
File
"N:\sfsu\tools\python\movpy\lib\Lib\site-packag
es\cherrypy\_cphttptools.py", line 106, in _run
File
"N:\sfsu\tools\python\movpy\lib\Lib\site-packag
es\cherrypy\_cphttptools.py", line 255, in main
TypeError: default() takes exactly 1 argument (3 given)
127.0.0.1 - - [10/Apr/2006:09:06:04] "GET
/resources/stylep.css HTTP/1.1" 500 1188 "http://localhost:8080/&qu
ot; "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
rv:1.8) Gecko/20051111 Firefox/1.5"
10/Apr/2006:09:06:04 HTTP INFO Page handler: <bound
method Russell.default of <__main__.Russell instance at
0x00CD1080>>
Traceback (most recent call last):
File
"N:\sfsu\tools\python\movpy\lib\Lib\site-packag
es\cherrypy\_cphttptools.py", line 106, in _run
File
"N:\sfsu\tools\python\movpy\lib\Lib\site-packag
es\cherrypy\_cphttptools.py", line 255, in main
TypeError: default() takes exactly 1 argument (3 given)
127.0.0.1 - - [10/Apr/2006:09:06:04] "GET
/resources/duck.jpg HTTP/1.1" 500 1188 "http://localhost:8080/&qu
ot; "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
rv:1.8) Gecko/20051111 Firefox/1.5"
10/Apr/2006:09:06:04 HTTP INFO Page handler: <bound
method Russell.default of <__main__.Russell instance at
0x00CD1080>>
Traceback (most recent call last):
File
"N:\sfsu\tools\python\movpy\lib\Lib\site-packag
es\cherrypy\_cphttptools.py", line 106, in _run
File
"N:\sfsu\tools\python\movpy\lib\Lib\site-packag
es\cherrypy\_cphttptools.py", line 255, in main
TypeError: default() takes exactly 1 argument (2 given)
127.0.0.1 - - [10/Apr/2006:09:06:04] "GET /favicon.ico
HTTP/1.1" 500 1188 "" "Mozilla/5.0
(Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111
Firefox/1.5" |
|
[1-5]
|
|