Commit 53e46d80 authored by Łukasz Nowak's avatar Łukasz Nowak

caddy-frontend: Fix JSON Content-Type

It is application/json no text/json.

Cf !358 (comment 63538)
parent 1de9f5d1
...@@ -1464,7 +1464,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin): ...@@ -1464,7 +1464,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
self.assertEqual( self.assertEqual(
headers, headers,
{'Age': '0', 'Content-type': 'text/json', {'Age': '0', 'Content-type': 'application/json',
'Set-Cookie': 'secured=value;secure, nonsecured=value'} 'Set-Cookie': 'secured=value;secure, nonsecured=value'}
) )
...@@ -1487,7 +1487,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin): ...@@ -1487,7 +1487,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
self.assertEqual( self.assertEqual(
headers, headers,
{'Age': '0', 'Content-type': 'text/json', {'Age': '0', 'Content-type': 'application/json',
'Set-Cookie': 'secured=value;secure, nonsecured=value'} 'Set-Cookie': 'secured=value;secure, nonsecured=value'}
) )
...@@ -1785,7 +1785,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin): ...@@ -1785,7 +1785,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
self.assertEqual( self.assertEqual(
headers, headers,
{'Age': '0', 'Content-type': 'text/json', {'Age': '0', 'Content-type': 'application/json',
'Set-Cookie': 'secured=value;secure, nonsecured=value', 'Set-Cookie': 'secured=value;secure, nonsecured=value',
'Content-Encoding': 'gzip', 'Vary': 'Accept-Encoding'} 'Content-Encoding': 'gzip', 'Vary': 'Accept-Encoding'}
) )
...@@ -1878,7 +1878,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin): ...@@ -1878,7 +1878,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
self.assertEqual( self.assertEqual(
headers, headers,
{'Age': '0', 'Content-type': 'text/json', {'Age': '0', 'Content-type': 'application/json',
'Set-Cookie': 'secured=value;secure, nonsecured=value', 'Set-Cookie': 'secured=value;secure, nonsecured=value',
'Content-Encoding': 'gzip', 'Vary': 'Accept-Encoding'} 'Content-Encoding': 'gzip', 'Vary': 'Accept-Encoding'}
) )
...@@ -1929,7 +1929,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin): ...@@ -1929,7 +1929,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
self.assertEqual( self.assertEqual(
headers, headers,
{'Age': '0', 'Content-type': 'text/json', {'Age': '0', 'Content-type': 'application/json',
'Set-Cookie': 'secured=value;secure, nonsecured=value', 'Set-Cookie': 'secured=value;secure, nonsecured=value',
'Content-Encoding': 'gzip', 'Vary': 'Accept-Encoding'} 'Content-Encoding': 'gzip', 'Vary': 'Accept-Encoding'}
) )
...@@ -1975,7 +1975,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin): ...@@ -1975,7 +1975,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
headers, headers,
{ {
'Vary': 'Accept-Encoding', 'Vary': 'Accept-Encoding',
'Content-Type': 'text/json', 'Content-Type': 'application/json',
'Set-Cookie': 'secured=value;secure, nonsecured=value', 'Set-Cookie': 'secured=value;secure, nonsecured=value',
'Content-Encoding': 'gzip', 'Content-Encoding': 'gzip',
} }
...@@ -2025,7 +2025,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin): ...@@ -2025,7 +2025,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
headers, headers,
{ {
'Vary': 'Accept-Encoding', 'Vary': 'Accept-Encoding',
'Content-type': 'text/json', 'Content-type': 'application/json',
'Set-Cookie': 'secured=value;secure, nonsecured=value', 'Set-Cookie': 'secured=value;secure, nonsecured=value',
'Content-Encoding': 'gzip', 'Content-Encoding': 'gzip',
} }
...@@ -2159,7 +2159,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin): ...@@ -2159,7 +2159,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
self.assertEqual( self.assertEqual(
headers, headers,
{ {
'Content-type': 'text/json', 'Content-type': 'application/json',
'Set-Cookie': 'secured=value;secure, nonsecured=value' 'Set-Cookie': 'secured=value;secure, nonsecured=value'
} }
) )
...@@ -2235,7 +2235,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin): ...@@ -2235,7 +2235,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
self.assertEqual( self.assertEqual(
headers, headers,
{ {
'Content-type': 'text/json', 'Content-type': 'application/json',
'Set-Cookie': 'secured=value;secure, nonsecured=value' 'Set-Cookie': 'secured=value;secure, nonsecured=value'
} }
) )
......
...@@ -254,7 +254,7 @@ class SlapOSInstanceTestCase(unittest.TestCase): ...@@ -254,7 +254,7 @@ class SlapOSInstanceTestCase(unittest.TestCase):
class TestHandler(BaseHTTPRequestHandler): class TestHandler(BaseHTTPRequestHandler):
def do_GET(self): def do_GET(self):
self.send_response(200) self.send_response(200)
self.send_header("Content-type", "text/json") self.send_header("Content-type", "application/json")
self.send_header('Set-Cookie', 'secured=value;secure') self.send_header('Set-Cookie', 'secured=value;secure')
self.send_header('Set-Cookie', 'nonsecured=value') self.send_header('Set-Cookie', 'nonsecured=value')
self.end_headers() self.end_headers()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment