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
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
caucase
Commits
5662c79a
Commit
5662c79a
authored
Oct 24, 2017
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wsgi: Prepare routing dict for extension.
parent
e1233c9d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
8 deletions
+20
-8
caucase/wsgi.py
caucase/wsgi.py
+20
-8
No files found.
caucase/wsgi.py
View file @
5662c79a
...
...
@@ -125,16 +125,28 @@ class Application(object):
}
self
.
_routing_dict
=
{
'crl'
:
{
'GET'
:
self
.
getCRL
,
'GET'
:
{
'method'
:
self
.
getCRL
,
},
},
'csr'
:
{
'GET'
:
self
.
getCSR
,
'PUT'
:
self
.
putCSR
,
'DELETE'
:
self
.
deleteCSR
,
'GET'
:
{
'method'
:
self
.
getCSR
,
},
'PUT'
:
{
'method'
:
self
.
putCSR
,
},
'DELETE'
:
{
'method'
:
self
.
deleteCSR
,
},
},
'crt'
:
{
'GET'
:
self
.
getCRT
,
'PUT'
:
self
.
putCRT
,
'GET'
:
{
'method'
:
self
.
getCRT
,
},
'PUT'
:
{
'method'
:
self
.
putCRT
,
},
},
}
...
...
@@ -162,10 +174,10 @@ class Application(object):
result
=
[]
else
:
try
:
method
=
method_dict
[
request_method
]
entry
=
method_dict
[
request_method
]
except
KeyError
:
raise
BadMethod
status
,
header_list
,
result
=
method
(
context
,
environ
,
path_item_list
[
2
:])
status
,
header_list
,
result
=
entry
[
'method'
]
(
context
,
environ
,
path_item_list
[
2
:])
except
ApplicationError
:
raise
except
exceptions
.
NotFound
:
...
...
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