mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 03:24:54 +00:00
[Tests] Fix AttributeError in test_core with Twisted 19
Should be setting header contents to string not ints and latest version of Twisted raised an error encountering int. Also correct the header name for setting length.
This commit is contained in:
parent
615500e6e6
commit
3c18e890e8
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ class PartialDownload(Resource):
|
|||
common.get_test_data_file('ubuntu-9.04-desktop-i386.iso.torrent'), 'rb'
|
||||
) as _file:
|
||||
data = _file.read()
|
||||
request.setHeader(b'Content-Type', len(data))
|
||||
request.setHeader(b'Content-Length', str(len(data)))
|
||||
request.setHeader(b'Content-Type', b'application/x-bittorrent')
|
||||
if request.requestHeaders.hasHeader('accept-encoding'):
|
||||
return compress(data, request)
|
||||
|
|
Loading…
Add table
Reference in a new issue