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
Jérome Perrin
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):
...
@@ -125,16 +125,28 @@ class Application(object):
}
}
self
.
_routing_dict
=
{
self
.
_routing_dict
=
{
'crl'
:
{
'crl'
:
{
'GET'
:
self
.
getCRL
,
'GET'
:
{
'method'
:
self
.
getCRL
,
},
},
},
'csr'
:
{
'csr'
:
{
'GET'
:
self
.
getCSR
,
'GET'
:
{
'PUT'
:
self
.
putCSR
,
'method'
:
self
.
getCSR
,
'DELETE'
:
self
.
deleteCSR
,
},
'PUT'
:
{
'method'
:
self
.
putCSR
,
},
'DELETE'
:
{
'method'
:
self
.
deleteCSR
,
},
},
},
'crt'
:
{
'crt'
:
{
'GET'
:
self
.
getCRT
,
'GET'
:
{
'PUT'
:
self
.
putCRT
,
'method'
:
self
.
getCRT
,
},
'PUT'
:
{
'method'
:
self
.
putCRT
,
},
},
},
}
}
...
@@ -162,10 +174,10 @@ class Application(object):
...
@@ -162,10 +174,10 @@ class Application(object):
result
=
[]
result
=
[]
else
:
else
:
try
:
try
:
method
=
method_dict
[
request_method
]
entry
=
method_dict
[
request_method
]
except
KeyError
:
except
KeyError
:
raise
BadMethod
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
:
except
ApplicationError
:
raise
raise
except
exceptions
.
NotFound
:
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