Skip to content
Snippets Groups Projects
Commit f9a96f0c authored by John Chilton's avatar John Chilton
Browse files

Bring in standard transport fix from Galaxy.

parent 6c6e1a74
No related branches found
No related tags found
No related merge requests found
......@@ -24,11 +24,13 @@ class Urllib2Transport(object):
input = None
try:
if input_path:
if getsize(input_path):
size = getsize(input_path)
if size:
input = open(input_path, 'rb')
data = mmap.mmap(input.fileno(), 0, access=mmap.ACCESS_READ)
else:
data = b""
request.add_header('Content-Length', str(size))
response = self._url_open(request, data)
finally:
if input:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment