Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kwabena Antwi-Boasiako
slapos
Commits
53e46d80
Commit
53e46d80
authored
Jul 13, 2018
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caddy-frontend: Fix JSON Content-Type
It is application/json no text/json. Cf
!358 (comment 63538)
parent
1de9f5d1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
software/caddy-frontend/test/test.py
software/caddy-frontend/test/test.py
+9
-9
software/caddy-frontend/test/utils.py
software/caddy-frontend/test/utils.py
+1
-1
No files found.
software/caddy-frontend/test/test.py
View file @
53e46d80
...
...
@@ -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'
}
)
...
...
software/caddy-frontend/test/utils.py
View file @
53e46d80
...
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment