defnull/bottle — Issue #276: AttributeError: 'LocalRequest' object has no attribute 'header'
Author: mwebber
Created: 2012-01-31 18:58:24+00:00
State: open

( I posted this to the bottlepy Google Group last week, but it's still waiting for a moderator to OK it).

I have been running successfully with bottle 0.9.6. I recently
upgraded to 0.10.7, and now my application is failing with:

Traceback (most recent call last):
File "/dls_sw/apps/DataDispenser/python/ws043/lib/python2.7/site-
packages/bottle.py", line 737, in _handle
return route.call(**args)
File "/dls_sw/apps/DataDispenser/python/ws043/lib/python2.7/site-
packages/bottle.py", line 1456, in wrapper
rv = callback(*a, **ka)
File "/dls_sw/apps/DataDispenser/dev/webinterface.py", line 267, in
login
destination_url = bottle.request.header.get('Referer',
'/').strip()
AttributeError: 'LocalRequest' object has no attribute 'header'

The changelog indicates that there have been some changes in this area
in 0.10, but looking at the docs, I think bottle.request.header should
still exist.

Is there a change I need to make to my code?

Thanks