mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-24 07:06:41 +00:00
Switch to a slightly larger block size.
This commit is contained in:
parent
67702572a9
commit
1823dd4c03
@ -55,9 +55,9 @@ def do_http(method, url, body=b""):
|
||||
assert body.read
|
||||
scheme, host, port, path = parse_url(url)
|
||||
if scheme == "http":
|
||||
c = http_client.HTTPConnection(host, port, timeout=60)
|
||||
c = http_client.HTTPConnection(host, port, timeout=60, blocksize=65536)
|
||||
elif scheme == "https":
|
||||
c = http_client.HTTPSConnection(host, port, timeout=60)
|
||||
c = http_client.HTTPSConnection(host, port, timeout=60, blocksize=65536)
|
||||
else:
|
||||
raise ValueError("unknown scheme '%s', need http or https" % scheme)
|
||||
c.putrequest(method, path)
|
||||
@ -78,7 +78,7 @@ def do_http(method, url, body=b""):
|
||||
return BadResponse(url, err)
|
||||
|
||||
while True:
|
||||
data = body.read(8192)
|
||||
data = body.read(65536)
|
||||
if not data:
|
||||
break
|
||||
c.send(data)
|
||||
|
Loading…
Reference in New Issue
Block a user