Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flaskdav
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
flaskdav
Commits
1b60cfa0
Commit
1b60cfa0
authored
Dec 03, 2015
by
iv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix double slash by using urljoin.
parent
e8eaa8d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
flaskdav.py
flaskdav.py
+4
-3
No files found.
flaskdav.py
View file @
1b60cfa0
...
...
@@ -2,6 +2,7 @@ from itsdangerous import Signer, base64_encode, base64_decode
from
flask
import
Flask
,
request
,
render_template
,
make_response
,
g
from
flask.views
import
MethodView
import
urlparse
import
shutil
import
utils
import
os
...
...
@@ -83,9 +84,9 @@ def before_request():
response
=
make_response
(
content
,
200
)
response
.
headers
=
headers
else
:
headers
[
'WWW-Authenticate'
]
=
\
'Nayookie login_url='
+
request
.
url_root
+
\
URI_BEGINNING_PATH
[
'authorization'
]
+
'{?back_url}'
headers
[
'WWW-Authenticate'
]
=
'Nayookie login_url='
+
\
urlparse
.
urljoin
(
request
.
url_root
,
URI_BEGINNING_PATH
[
'authorization'
]
)
+
'{?back_url}'
response
=
make_response
(
content
,
401
)
response
.
headers
=
headers
# do not handle the request if not authorized
...
...
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