From f76e75d4a742ae8c53e7bf04392984f0d67fbf75 Mon Sep 17 00:00:00 2001 From: Shuai Lin Date: Mon, 19 Jun 2017 13:16:21 +0800 Subject: [PATCH] Fixed the location header after creating directory. The path separator was missing. --- seahub/api2/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/seahub/api2/views.py b/seahub/api2/views.py index 3ceb94498f..64343b05b4 100644 --- a/seahub/api2/views.py +++ b/seahub/api2/views.py @@ -2669,8 +2669,8 @@ class DirView(APIView): else: resp = Response('success', status=status.HTTP_201_CREATED) uri = reverse('DirView', args=[repo_id], request=request) - resp['Location'] = uri + '?p=' + quote(parent_dir.encode('utf-8')) + \ - quote(new_dir_name.encode('utf-8')) + resp['Location'] = uri + '?p=' + quote( + parent_dir.encode('utf-8') + '/' + new_dir_name.encode('utf-8')) return resp elif operation.lower() == 'rename':