From 2d9fe8b625cda630a302e264c585159bbe1805d9 Mon Sep 17 00:00:00 2001 From: Tiara Rodney Date: Sat, 21 Jun 2025 20:26:36 +0200 Subject: [PATCH 1/2] feat(urllib.request): add compression support for PkgHandler --- src/byteb4rb1e/utils/urllib/request.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/byteb4rb1e/utils/urllib/request.py b/src/byteb4rb1e/utils/urllib/request.py index 3f9ee20..2408d94 100644 --- a/src/byteb4rb1e/utils/urllib/request.py +++ b/src/byteb4rb1e/utils/urllib/request.py @@ -22,7 +22,10 @@ class PkgHandler(urllib.request.BaseHandler): size = fh.tell(); fh.seek(0); - mtype, _ = mimetypes.guess_type(req.selector) + mtype, compression = mimetypes.guess_type(req.selector) + + if compression and mtype: + mtype = f"{mtype}+{compression}" headers = email.message_from_string( 'Content-Type: %s\nContent-Length: %d\n' % From 7e18e4795df73db2c50f2e2cd7457d9c9ec25305 Mon Sep 17 00:00:00 2001 From: Tiara Rodney Date: Sat, 21 Jun 2025 20:27:09 +0200 Subject: [PATCH 2/2] todo(14): done --- TODO | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TODO b/TODO index 20427a8..9b0c012 100644 --- a/TODO +++ b/TODO @@ -200,7 +200,7 @@ Description: change of issue 12 wasn't properly reflected in urllib PkgHandler ID: 14 Type: feature Title: add compression support for urllib PkgHandler -Status: in-progress +Status: done Priority: high Created: 2025-06-21 Description: with a proper content-type of the PkgHandler addinfourl object, a