python-http_request 0.1.6.3__tar.gz → 0.1.6.4__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_http_request-0.1.6.3 → python_http_request-0.1.6.4}/PKG-INFO +1 -1
- {python_http_request-0.1.6.3 → python_http_request-0.1.6.4}/http_request/__init__.py +8 -6
- {python_http_request-0.1.6.3 → python_http_request-0.1.6.4}/pyproject.toml +1 -1
- {python_http_request-0.1.6.3 → python_http_request-0.1.6.4}/LICENSE +0 -0
- {python_http_request-0.1.6.3 → python_http_request-0.1.6.4}/http_request/extension/__init__.py +0 -0
- {python_http_request-0.1.6.3 → python_http_request-0.1.6.4}/http_request/extension/request.py +0 -0
- {python_http_request-0.1.6.3 → python_http_request-0.1.6.4}/http_request/py.typed +0 -0
- {python_http_request-0.1.6.3 → python_http_request-0.1.6.4}/readme.md +0 -0
|
@@ -253,16 +253,17 @@ def encode_multipart_data(
|
|
|
253
253
|
match value:
|
|
254
254
|
case [value]:
|
|
255
255
|
pass
|
|
256
|
-
case [
|
|
256
|
+
case [filename, value]:
|
|
257
257
|
pass
|
|
258
|
-
case [
|
|
258
|
+
case [filename, value, file_type]:
|
|
259
259
|
if file_type:
|
|
260
260
|
headers[b"content-type"] = ensure_bytes_(file_type)
|
|
261
|
-
case [
|
|
261
|
+
case [filename, value, file_type, file_headers, *rest]:
|
|
262
262
|
for k, v in iter_items(file_headers):
|
|
263
263
|
headers[ensure_bytes_(k).lower()] = ensure_bytes_(v)
|
|
264
264
|
if file_type:
|
|
265
265
|
headers[b"content-type"] = ensure_bytes_(file_type)
|
|
266
|
+
filename = ensure_bytes_(filename)
|
|
266
267
|
if isinstance(value, (PathLike, SupportsRead)):
|
|
267
268
|
is_file = True
|
|
268
269
|
if isinstance(value, PathLike):
|
|
@@ -347,16 +348,17 @@ def encode_multipart_data_async(
|
|
|
347
348
|
match value:
|
|
348
349
|
case [value]:
|
|
349
350
|
pass
|
|
350
|
-
case [
|
|
351
|
+
case [filename, value]:
|
|
351
352
|
pass
|
|
352
|
-
case [
|
|
353
|
+
case [filename, value, file_type]:
|
|
353
354
|
if file_type:
|
|
354
355
|
headers[b"content-type"] = ensure_bytes_(file_type)
|
|
355
|
-
case [
|
|
356
|
+
case [filename, value, file_type, file_headers, *rest]:
|
|
356
357
|
for k, v in iter_items(file_headers):
|
|
357
358
|
headers[ensure_bytes_(k).lower()] = ensure_bytes_(v)
|
|
358
359
|
if file_type:
|
|
359
360
|
headers[b"content-type"] = ensure_bytes_(file_type)
|
|
361
|
+
filename = ensure_bytes_(filename)
|
|
360
362
|
if isinstance(value, (PathLike, SupportsRead)):
|
|
361
363
|
is_file = True
|
|
362
364
|
if isinstance(value, PathLike):
|
|
File without changes
|
{python_http_request-0.1.6.3 → python_http_request-0.1.6.4}/http_request/extension/__init__.py
RENAMED
|
File without changes
|
{python_http_request-0.1.6.3 → python_http_request-0.1.6.4}/http_request/extension/request.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|