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

caddy-frontend: Fix JSON Content-Type

It is application/json no text/json.

Cf nexedi/slapos!358 (comment 63538)
parent 1de9f5d1
......@@ -1464,7 +1464,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
self.assertEqual(
headers,
{'Age': '0', 'Content-type': 'text/json',
{'Age': '0', 'Content-type': 'application/json',
'Set-Cookie': 'secured=value;secure, nonsecured=value'}
)
......@@ -1487,7 +1487,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
self.assertEqual(
headers,
{'Age': '0', 'Content-type': 'text/json',
{'Age': '0', 'Content-type': 'application/json',
'Set-Cookie': 'secured=value;secure, nonsecured=value'}
)
......@@ -1785,7 +1785,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
self.assertEqual(
headers,
{'Age': '0', 'Content-type': 'text/json',
{'Age': '0', 'Content-type': 'application/json',
'Set-Cookie': 'secured=value;secure, nonsecured=value',
'Content-Encoding': 'gzip', 'Vary': 'Accept-Encoding'}
)
......@@ -1878,7 +1878,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
self.assertEqual(
headers,
{'Age': '0', 'Content-type': 'text/json',
{'Age': '0', 'Content-type': 'application/json',
'Set-Cookie': 'secured=value;secure, nonsecured=value',
'Content-Encoding': 'gzip', 'Vary': 'Accept-Encoding'}
)
......@@ -1929,7 +1929,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
self.assertEqual(
headers,
{'Age': '0', 'Content-type': 'text/json',
{'Age': '0', 'Content-type': 'application/json',
'Set-Cookie': 'secured=value;secure, nonsecured=value',
'Content-Encoding': 'gzip', 'Vary': 'Accept-Encoding'}
)
......@@ -1975,7 +1975,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
headers,
{
'Vary': 'Accept-Encoding',
'Content-Type': 'text/json',
'Content-Type': 'application/json',
'Set-Cookie': 'secured=value;secure, nonsecured=value',
'Content-Encoding': 'gzip',
}
......@@ -2025,7 +2025,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
headers,
{
'Vary': 'Accept-Encoding',
'Content-type': 'text/json',
'Content-type': 'application/json',
'Set-Cookie': 'secured=value;secure, nonsecured=value',
'Content-Encoding': 'gzip',
}
......@@ -2159,7 +2159,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
self.assertEqual(
headers,
{
'Content-type': 'text/json',
'Content-type': 'application/json',
'Set-Cookie': 'secured=value;secure, nonsecured=value'
}
)
......@@ -2235,7 +2235,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
self.assertEqual(
headers,
{
'Content-type': 'text/json',
'Content-type': 'application/json',
'Set-Cookie': 'secured=value;secure, nonsecured=value'
}
)
......
......@@ -254,7 +254,7 @@ class SlapOSInstanceTestCase(unittest.TestCase):
class TestHandler(BaseHTTPRequestHandler):
def do_GET(self):
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', 'nonsecured=value')
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