Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update routing.py #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions corepost/routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def getResponse(self,request):
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]
Expand Down Expand Up @@ -428,4 +428,4 @@ def __filterRequests(self,request):
def __filterResponses(self,request,response):
"""Filters incoming requests"""
for webFilter in self.__responseFilters:
webFilter.filterResponse(request,response)
webFilter.filterResponse(request,response)