Skip to content
Permalink
Browse files

headers can not handle non-string values

  • Loading branch information
dangra committed Aug 8, 2014
1 parent a274a7f commit 94a5c6576482e75fb7fc4b284f636d0d6b9cc62d
Showing with 2 additions and 2 deletions.
  1. +2 −2 scrapy/core/downloader/handlers/ftp.py
@@ -83,13 +83,13 @@ def gotClient(self, client, request, filepath):
callbackArgs=(request, protocol),
errback=self._failed,
errbackArgs=(request,))

def _build_response(self, result, request, protocol):
self.result = result
respcls = responsetypes.from_args(url=request.url)
protocol.close()
body = protocol.filename or protocol.body.read()
headers = {"local filename": protocol.filename or '', "size": protocol.size}
headers = {"local filename": protocol.filename or '', "size": str(protocol.size)}
return respcls(url=request.url, status=200, body=body, headers=headers)

def _failed(self, result, request):

0 comments on commit 94a5c65

Please sign in to comment.
You can’t perform that action at this time.