Hi,
I am trying to catch "invalid request" after requesting non-existing
file from static folder of application "eshop". My routest.py:


routes_onerror = [
        #('eshop/400', '/eshop/default/HTTP_404'),
        ('*/*', '/eshop/default/HTTP_error')
]

routes_app = (
        (r'.*http://meganabytek\.cz.*', r'eshop'),
        (r'.*http://www\.meganabytek\.cz.*', r'eshop'),

        (r'.*http://kitenavigator\.com.*', r'kitenavigator'),
        (r'.*http://www\.kitenavigator\.com.*', r'kitenavigator'),

        (r'.*http://blog\.meganabytek\.cz.*', r'blog'),
        (r'.*http://vysocinacup\.meganabytek\.cz.*', r'o_apmas'),

        #('/eshop/appadmin/$f', '/eshop/appadmin/$f'), # enable
administration
        #('/eshop/static/$f', '/eshop/static/$f'), # enable static files

)

On my PC it works good. Just request.vars.requested_uri in HTTP_error
function is None. It stop working When I move the code on hosting.
Looks like on http error happend but in uwsgi log I can see:

GET /eshop/static/photo.thumb.9ee2c7f07e9b810b.
4b30315f736b72696e6b612d757a617672656e612d6b6f6d622d2e6a7067.jpg =>
generated 573 bytes in 2 msecs (HTTP/1.1 404) 3 headers in 115 bytes
(1 switches on core 0)

Can anybody help me?


Reply via email to