Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
corepost
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
nexlab
corepost
Commits
8671a0a3
Commit
8671a0a3
authored
Jul 29, 2013
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update routing.py
Fix index out of range unandled exception when request.postpath is an empty list
parent
aca1a7b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
routing.py
corepost/routing.py
+2
-2
No files found.
corepost/routing.py
View file @
8671a0a3
...
...
@@ -212,7 +212,7 @@ class RequestRouter:
self
.
__filterRequests
(
request
)
# standardize URL and remove trailing "/" if necessary
standardized_postpath
=
request
.
postpath
if
(
request
.
postpath
[
-
1
]
!=
''
or
request
.
postpath
==
[
''
])
else
request
.
postpath
[:
-
1
]
standardized_postpath
=
request
.
postpath
if
(
len
(
request
.
postpath
)
==
0
or
request
.
postpath
[
-
1
]
!=
''
or
request
.
postpath
==
[
''
])
else
request
.
postpath
[:
-
1
]
path
=
'/'
.
join
(
standardized_postpath
)
contentType
=
MediaType
.
WILDCARD
if
HttpHeader
.
CONTENT_TYPE
not
in
request
.
received_headers
else
request
.
received_headers
[
HttpHeader
.
CONTENT_TYPE
]
...
...
@@ -428,4 +428,4 @@ class RequestRouter:
def
__filterResponses
(
self
,
request
,
response
):
"""Filters incoming requests"""
for
webFilter
in
self
.
__responseFilters
:
webFilter
.
filterResponse
(
request
,
response
)
\ No newline at end of file
webFilter
.
filterResponse
(
request
,
response
)
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