Make web status text/plain
When I added the JSON targets in I3410a4e4efd649732747b0502d66d212f50fa1bb I also changed the text output mime-type to be application/text, which seemed to pair with application/json. But this means browsers prompt to download the file rather than display it, which is not the intention. Restore to text/plain. Change-Id: I6fa6597b2fcd05a4c33ba4932c966101daf98ecf
This commit is contained in:
parent
a21a2cdae7
commit
3e0035e908
@ -39,7 +39,7 @@ class TestWebApp(tests.DBTestCase):
|
||||
"http://localhost:%s/image-list" % port)
|
||||
f = urllib2.urlopen(req)
|
||||
self.assertEqual(f.info().getheader('Content-Type'),
|
||||
'application/text')
|
||||
'text/plain; charset=UTF-8')
|
||||
data = f.read()
|
||||
self.assertTrue('fake-image' in data)
|
||||
|
||||
|
@ -93,7 +93,7 @@ class WebApp(threading.Thread):
|
||||
if request.path.endswith('.json'):
|
||||
content_type = 'application/json'
|
||||
else:
|
||||
content_type = 'application/text'
|
||||
content_type = 'text/plain'
|
||||
|
||||
response = webob.Response(body=output,
|
||||
content_type=content_type)
|
||||
|
Loading…
x
Reference in New Issue
Block a user