Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
97c2e9ec
Commit
97c2e9ec
authored
Jun 24, 2013
by
Don Mitchell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make url matching regex flexible to allow for browsers that munged :// into :/
parent
26aa085d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
15 deletions
+1
-15
common/lib/xmodule/xmodule/modulestore/__init__.py
+1
-15
No files found.
common/lib/xmodule/xmodule/modulestore/__init__.py
View file @
97c2e9ec
...
...
@@ -16,16 +16,7 @@ log = logging.getLogger('mitx.' + 'modulestore')
URL_RE
=
re
.
compile
(
"""
(?P<tag>[^:]+)://
(?P<org>[^/]+)/
(?P<course>[^/]+)/
(?P<category>[^/]+)/
(?P<name>[^@]+)
(@(?P<revision>[^/]+))?
"""
,
re
.
VERBOSE
)
MISSING_SLASH_URL_RE
=
re
.
compile
(
"""
(?P<tag>[^:]+):/
(?P<tag>[^:]+)://?
(?P<org>[^/]+)/
(?P<course>[^/]+)/
(?P<category>[^/]+)/
...
...
@@ -180,11 +171,6 @@ class Location(_LocationBase):
if
isinstance
(
location
,
basestring
):
match
=
URL_RE
.
match
(
location
)
if
match
is
None
:
# cdodge:
# check for a dropped slash near the i4x:// element of the location string. This can happen with some
# redirects (e.g. edx.org -> www.edx.org which I think happens in Nginx)
match
=
MISSING_SLASH_URL_RE
.
match
(
location
)
if
match
is
None
:
log
.
debug
(
'location is instance of
%
s but no URL match'
%
basestring
)
raise
InvalidLocationError
(
location
)
groups
=
match
.
groupdict
()
...
...
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