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
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
Łukasz Nowak
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
Show 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):
...
@@ -36,7 +36,9 @@ class ApplicationError(Exception):
WSGI HTTP error base class.
WSGI HTTP error base class.
"""
"""
status
=
_getStatus
(
httplib
.
INTERNAL_SERVER_ERROR
)
status
=
_getStatus
(
httplib
.
INTERNAL_SERVER_ERROR
)
response_headers
=
()
@
property
def
response_headers
(
self
):
return
[]
class
BadRequest
(
ApplicationError
):
class
BadRequest
(
ApplicationError
):
"""
"""
...
@@ -160,15 +162,13 @@ class Application(object):
...
@@ -160,15 +162,13 @@ class Application(object):
traceback
.
print_exc
(
file
=
sys
.
stderr
)
traceback
.
print_exc
(
file
=
sys
.
stderr
)
raise
ApplicationError
raise
ApplicationError
except
ApplicationError
,
e
:
except
ApplicationError
,
e
:
start_response
(
status
=
e
.
status
e
.
status
,
header_list
=
e
.
response_headers
list
(
e
.
response_headers
),
)
result
=
[
str
(
x
)
for
x
in
e
.
args
]
result
=
[
str
(
x
)
for
x
in
e
.
args
]
else
:
start_response
(
start_response
(
status
,
status
,
header_list
,
header_list
+
[
],
)
)
return
result
return
result
...
...
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