Skip to content

Commit a214b24

Browse files
authored
Update pycatfile_py3.py
1 parent 6d13916 commit a214b24

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

pycatfile_py3.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16686,6 +16686,10 @@ def download_file_from_internet_file(url: str, **kwargs: Any):
1668616686
if p.scheme in ("tcp", "udp") or p.scheme in _BT_SCHEMES:
1668716687
parts, o = _parse_net_url(url)
1668816688
path_text = parts.path or "/"
16689+
if parts.scheme in _BT_SCHEMES and not o.get("framing"):
16690+
o["framing"] = "len"
16691+
if parts.scheme in _BT_SCHEMES and o.get("handshake") is None:
16692+
o["handshake"] = False
1668916693
if parts.scheme in _BT_SCHEMES:
1669016694
qs = parse_qs(parts.query or "")
1669116695
host, port = _bt_host_channel_from_url(parts, qs, o)
@@ -17440,7 +17444,10 @@ def upload_file_to_internet_file(fileobj, url: str, **kwargs: Any):
1744017444
if p.scheme in ("tcp", "udp") or p.scheme in _BT_SCHEMES:
1744117445
parts, o = _parse_net_url(url)
1744217446
path_text = parts.path or "/"
17443-
17447+
if parts.scheme in _BT_SCHEMES and not o.get("framing"):
17448+
o["framing"] = "len"
17449+
if parts.scheme in _BT_SCHEMES and o.get("handshake") is None:
17450+
o["handshake"] = False
1744417451
if parts.scheme in _BT_SCHEMES:
1744517452
qs = parse_qs(parts.query or "")
1744617453
o2 = dict(o)

0 commit comments

Comments
 (0)