Fix up urlencoding of remotestorage

This commit is contained in:
Markus Unterwaditzer 2015-12-20 22:18:29 +01:00
parent b828685386
commit 51abf452a1

View file

@ -204,8 +204,6 @@ class RemoteStorage(Storage):
data=item.raw.encode('utf-8'), data=item.raw.encode('utf-8'),
headers=headers headers=headers
) )
if not response.url.endswith('/' + href):
raise exceptions.InvalidResponse('spec doesn\'t allow redirects')
return href, response.headers['etag'] return href, response.headers['etag']
def update(self, href, item, etag): def update(self, href, item, etag):
@ -214,8 +212,7 @@ class RemoteStorage(Storage):
return etag return etag
def upload(self, item): def upload(self, item):
href = utils.generate_href(item.ident) href = utils.generate_href(item.ident) + self.fileext
href = utils.compat.urlquote(href, '@') + self.fileext
return self._put(href, item, None) return self._put(href, item, None)
def delete(self, href, etag): def delete(self, href, etag):