GET http://<host>:<port>/ with out an "Accept: " header causes glance-api to return a 500 error

Bug #803260 reported by Justin Shepherd
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Medium
Justin Shepherd

Bug Description

Steps to reproduce issue:

Pull down lp:~jshepher/glance/functional_tests_using_httplib2_part2

test_003_version_variations, step #0 will cause a 500 from glance-api.

=====

Here is the stack trace from the error:

 DEBUG [eventlet.wsgi.server] Traceback (most recent call last):
  File "/Users/justinshepherd/Projects/bzr/glance/glance-trunk/.glance-venv/lib/python2.6/site-packages/eventlet/wsgi.py", line 336, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/Users/justinshepherd/Projects/bzr/glance/glance-trunk/.glance-venv/lib/python2.6/site-packages/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/Users/justinshepherd/Projects/bzr/glance/glance-trunk/.glance-venv/lib/python2.6/site-packages/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/Users/justinshepherd/Projects/bzr/glance/functional_tests_using_httplib2/glance/common/wsgi.py", line 110, in __call__
    response = self.process_request(req)
  File "/Users/justinshepherd/Projects/bzr/glance/functional_tests_using_httplib2/glance/api/middleware/version_negotiation.py", line 77, in process_request
    accept = req.headers['Accept']
  File "/Users/justinshepherd/Projects/bzr/glance/glance-trunk/.glance-venv/lib/python2.6/site-packages/webob/headers.py", line 135, in __getitem__
    return self.environ[_trans_name(hname)]
KeyError: 'HTTP_ACCEPT'

Related branches

Changed in glance:
assignee: nobody → Justin Shepherd (jshepher)
status: New → In Progress
Jay Pipes (jaypipes)
Changed in glance:
milestone: none → diablo-3
importance: Undecided → Medium
Changed in glance:
status: In Progress → Fix Committed
Hugo Kou (tonytkdk)
Changed in glance:
status: Fix Committed → Fix Released
Revision history for this message
Hugo Kou (tonytkdk) wrote :

Sorry , I changed status by mistake

Thierry Carrez (ttx)
Changed in glance:
status: Fix Released → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: diablo-3 → 2011.3
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.