I am using the technique shown here 
(http://web2py.com/books/default/chapter/29/04/the-core?#Routes-on-error) 
to send email notifications when a ticket is generated for my app.

I'm getting different behaviors on my development and test environments.

Test environment:
web2py version 2.10.0-beta+timestamp.2014.09.24.13.35.58
Running the rocket web server on windows
routes.py:
routes_onerror = [

    ('connect/*', '/connect/default/error_handler')
]




Production environment:
web2py version 2.9.5-turn+timestamp.2014.08.06.14.51.23
Running nginx/uwsgi on Ubuntu
routes.py:
default_application = 'connect'    # ordinarily set in base routes.py
default_controller = 'dashboard'  # ordinarily set in app-specific routes.py
default_function = 'index'      # ordinarily set in app-specific routes.py


routers = dict(BASE=dict(domains={'www.infocenter.qlf.com':'connect'... 
 there is more here, but this line is not the problem}

routes_onerror = [
        ('connect/*', '/connect/default/error_handler')
]


I'm using this to get the URI in my error handler:
    requested_uri = request.env.request_uri


On my development system it returns:

*/connect/asset/index?asset_type=0&search_text=table*

On my production system, it returns:

*/connect/default/error_handler?code=500&ticket=connect/99.99.99.99.2014-12-04.12-10-04.41078001-775c-4d48-a841-dcb5391d3721&requested_uri=%2Fconnect%2Fasset%2Findex%3Fasset_type%3D0%26search_text%3Dtest&request_url=/asset*

(the 99.99.99.99 above was the IP address)

Any idea why it returns the different URI on the production system?


NOTE - I have 2 production servers, the second is running 
Windows/Apache/mod-wsgi and is exhibiting the same behavior as the ubuntu 
(other production) server.


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to