python-httpfile 0.0.5__tar.gz → 0.0.5.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_httpfile-0.0.5 → python_httpfile-0.0.5.1}/PKG-INFO +2 -1
- {python_httpfile-0.0.5 → python_httpfile-0.0.5.1}/httpfile/__init__.py +10 -10
- {python_httpfile-0.0.5 → python_httpfile-0.0.5.1}/pyproject.toml +1 -1
- {python_httpfile-0.0.5 → python_httpfile-0.0.5.1}/LICENSE +0 -0
- {python_httpfile-0.0.5 → python_httpfile-0.0.5.1}/httpfile/py.typed +0 -0
- {python_httpfile-0.0.5 → python_httpfile-0.0.5.1}/readme.md +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-httpfile
|
|
3
|
-
Version: 0.0.5
|
|
3
|
+
Version: 0.0.5.1
|
|
4
4
|
Summary: Python httpfile.
|
|
5
5
|
Home-page: https://github.com/ChenyangGao/web-mount-packs/tree/main/python-module/python-httpfile
|
|
6
6
|
License: MIT
|
|
@@ -17,6 +17,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.10
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.11
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
21
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
22
|
Classifier: Topic :: Software Development
|
|
22
23
|
Classifier: Topic :: Software Development :: Libraries
|
|
@@ -106,13 +106,13 @@ class HTTPFileReader(RawIOBase, BinaryIO):
|
|
|
106
106
|
urlopen = urlopen,
|
|
107
107
|
):
|
|
108
108
|
if headers:
|
|
109
|
-
headers = {**headers, "
|
|
109
|
+
headers = {**headers, "accept-encoding": "identity"}
|
|
110
110
|
else:
|
|
111
|
-
headers = {"
|
|
111
|
+
headers = {"accept-encoding": "identity"}
|
|
112
112
|
if start > 0:
|
|
113
|
-
headers["
|
|
113
|
+
headers["range"] = f"bytes={start}-"
|
|
114
114
|
elif start < 0:
|
|
115
|
-
headers["
|
|
115
|
+
headers["range"] = f"bytes={start}"
|
|
116
116
|
if urlopen is None:
|
|
117
117
|
urlopen = globals()["urlopen"]
|
|
118
118
|
if callable(url):
|
|
@@ -316,7 +316,7 @@ class HTTPFileReader(RawIOBase, BinaryIO):
|
|
|
316
316
|
url = self.url
|
|
317
317
|
response = self.urlopen(
|
|
318
318
|
url() if callable(url) else url,
|
|
319
|
-
headers={**self.headers, "
|
|
319
|
+
headers={**self.headers, "range": f"bytes={start}-"}
|
|
320
320
|
)
|
|
321
321
|
length_new = get_total_length(response)
|
|
322
322
|
if self.length != length_new:
|
|
@@ -572,13 +572,13 @@ class AsyncHTTPFileReader(HTTPFileReader):
|
|
|
572
572
|
urlopen = None,
|
|
573
573
|
):
|
|
574
574
|
if headers:
|
|
575
|
-
headers = {**headers, "
|
|
575
|
+
headers = {**headers, "accept-encoding": "identity"}
|
|
576
576
|
else:
|
|
577
|
-
headers = {"
|
|
577
|
+
headers = {"accept-encoding": "identity"}
|
|
578
578
|
if start > 0:
|
|
579
|
-
headers["
|
|
579
|
+
headers["range"] = f"bytes={start}-"
|
|
580
580
|
elif start < 0:
|
|
581
|
-
headers["
|
|
581
|
+
headers["range"] = f"bytes={start}"
|
|
582
582
|
if urlopen is None:
|
|
583
583
|
urlopen = globals()["urlopen"]
|
|
584
584
|
if callable(url):
|
|
@@ -751,7 +751,7 @@ class AsyncHTTPFileReader(HTTPFileReader):
|
|
|
751
751
|
url = self.url
|
|
752
752
|
response = await self.urlopen(
|
|
753
753
|
(await url()) if callable(url) else url,
|
|
754
|
-
headers={**self.headers, "
|
|
754
|
+
headers={**self.headers, "range": f"bytes={start}-"}
|
|
755
755
|
)
|
|
756
756
|
length_new = get_total_length(response)
|
|
757
757
|
if self.length != length_new:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|