Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caucase
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
caucase
Commits
90a9b987
Commit
90a9b987
authored
Oct 18, 2017
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wsgi: Call start_response from a single place.
Prepares for CORS headers auto-generation.
parent
87ebda84
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
caucase/wsgi.py
caucase/wsgi.py
+10
-10
No files found.
caucase/wsgi.py
View file @
90a9b987
...
...
@@ -36,7 +36,9 @@ class ApplicationError(Exception):
WSGI HTTP error base class.
"""
status
=
_getStatus
(
httplib
.
INTERNAL_SERVER_ERROR
)
response_headers
=
()
@
property
def
response_headers
(
self
):
return
[]
class
BadRequest
(
ApplicationError
):
"""
...
...
@@ -160,16 +162,14 @@ class Application(object):
traceback
.
print_exc
(
file
=
sys
.
stderr
)
raise
ApplicationError
except
ApplicationError
,
e
:
start_response
(
e
.
status
,
list
(
e
.
response_headers
),
)
status
=
e
.
status
header_list
=
e
.
response_headers
result
=
[
str
(
x
)
for
x
in
e
.
args
]
else
:
sta
rt_response
(
status
,
header_list
,
)
start_response
(
sta
tus
,
header_list
+
[
]
,
)
return
result
@
staticmethod
...
...
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