Content-type incorrect when 404 returned

Bug #843177 reported by klmitch
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
High
Unassigned

Bug Description

Writing tests to confirm fix for Issue #5, I noticed that if you make a request with application/json or application/xml content-type header, an incorrect content-type of text/html is returned.

Tags: bug
Revision history for this message
klmitch (q-noreply) wrote :

I'm receiving a content type of "text/plain; charset=UTF-8" on 404's.

Revision history for this message
klmitch (q-noreply) wrote :

@jaypipes: Can you verify that this is fixed, and close if appropriate?

Revision history for this message
klmitch (q-noreply) wrote :

I actually can't get a single unit test to run with Keystone's
recommended way of running unit tests, so I'm not sure :(

$> python keystone/test/unit/test_keystone.py

produces masses of the following:

ERROR: test_a_get_version_json (test_version.VersionTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jpipes/repos/keystone/keystone/test/unit/test_version.py",
line 36, in test_a_get_version_json
    headers={"Content-Type": "application/json"})
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line
1129, in request
    (response, content) = self._request(conn, authority, uri,
request_uri, method, body, headers, redirections, cachekey)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line
901, in _request
    (response, content) = self._conn_request(conn, request_uri,
method, body, headers)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line
871, in _conn_request
    response = conn.getresponse()
  File "/usr/lib/python2.7/httplib.py", line 1025, in getresponse
    response = self.response_class(*args, **kwds)
  File "/usr/lib/python2.7/httplib.py", line 346, in __init__
    self.fp = sock.makefile('rb', 0)
AttributeError: 'NoneType' object has no attribute 'makefile'

Hundreds of the above error messages...

When I looked for the test cases that I wrote, I found that the base
unit test that I put in /test/unit/base.py is now completely gone. :(

-jay

On Wed, Jul 27, 2011 at 6:53 PM, dolph
<email address hidden>
wrote:
> @jaypipes: Can you verify that this is fixed, and close if appropriate?
>
> --
> Reply to this email directly or view it on GitHub:
> https://github.com/rackspace/keystone/issues/13#issuecomment-1668614
>

Revision history for this message
klmitch (q-noreply) wrote :

Works for me now...

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.