Skip to content

Commit 2023a79

Browse files
authored
Update pywwwget_py3_optimized_bluetooth.py
1 parent 92b6c68 commit 2023a79

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

pywwwget_py3_optimized_bluetooth.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5387,6 +5387,10 @@ def download_file_from_internet_file(url: str, **kwargs: Any):
53875387
if p.scheme in ("tcp", "udp") or p.scheme in _BT_SCHEMES:
53885388
parts, o = _parse_net_url(url)
53895389
path_text = parts.path or "/"
5390+
if parts.scheme in _BT_SCHEMES and not o.get("framing"):
5391+
o["framing"] = "len"
5392+
if parts.scheme in _BT_SCHEMES and o.get("handshake") is None:
5393+
o["handshake"] = False
53905394
if parts.scheme in _BT_SCHEMES:
53915395
qs = parse_qs(parts.query or "")
53925396
host, port = _bt_host_channel_from_url(parts, qs, o)
@@ -6141,7 +6145,10 @@ def upload_file_to_internet_file(fileobj, url: str, **kwargs: Any):
61416145
if p.scheme in ("tcp", "udp") or p.scheme in _BT_SCHEMES:
61426146
parts, o = _parse_net_url(url)
61436147
path_text = parts.path or "/"
6144-
6148+
if parts.scheme in _BT_SCHEMES and not o.get("framing"):
6149+
o["framing"] = "len"
6150+
if parts.scheme in _BT_SCHEMES and o.get("handshake") is None:
6151+
o["handshake"] = False
61456152
if parts.scheme in _BT_SCHEMES:
61466153
qs = parse_qs(parts.query or "")
61476154
o2 = dict(o)

0 commit comments

Comments
 (0)