#34 mdapi-run: add content-type application/json
Merged 8 years ago by pingou. Opened 8 years ago by puiterwijk.
puiterwijk/mdapi fix-content-type  into  master

file modified
+10 -5
@@ -179,7 +179,8 @@ 

      if pretty:

          args = dict(sort_keys=True, indent=4, separators=(',', ': '))

  

-     return web.Response(body=json.dumps(output, **args).encode('utf-8'))

+     return web.Response(body=json.dumps(output, **args).encode('utf-8'),

+                         content_type='application/json')

  

  

  @asyncio.coroutine
@@ -208,7 +209,8 @@ 

      if pretty:

          args = dict(sort_keys=True, indent=4, separators=(',', ': '))

  

-     return web.Response(body=json.dumps(output, **args).encode('utf-8'))

+     return web.Response(body=json.dumps(output, **args).encode('utf-8'),

+                         content_type='application/json')

  

  

  @asyncio.coroutine
@@ -237,7 +239,8 @@ 

      if pretty:

          args = dict(sort_keys=True, indent=4, separators=(',', ': '))

  

-     return web.Response(body=json.dumps(output, **args).encode('utf-8'))

+     return web.Response(body=json.dumps(output, **args).encode('utf-8'),

+                         content_type='application/json')

  

  

  @asyncio.coroutine
@@ -256,7 +259,8 @@ 

      if pretty:

          args = dict(sort_keys=True, indent=4, separators=(',', ': '))

  

-     return web.Response(body=json.dumps(output, **args).encode('utf-8'))

+     return web.Response(body=json.dumps(output, **args).encode('utf-8'),

+                         content_type='application/json')

  

  

  def process_dep(request, action):
@@ -278,7 +282,8 @@ 

      if pretty:

          args = dict(sort_keys=True, indent=4, separators=(',', ': '))

  

-     return web.Response(body=json.dumps(output, **args).encode('utf-8'))

+     return web.Response(body=json.dumps(output, **args).encode('utf-8'),

+                         content_type='application/json')

  

  

  @asyncio.coroutine

no initial comment

Could you rebase on the top of master?

Pull-Request has been rebased

8 years ago

Pull-Request has been merged by pingou

8 years ago
Metadata