[pacman-dev] [PATCH 2/3] pmserve: allow serving byte objects directly
Andrew Gregory
andrew.gregory.8 at gmail.com
Tue Apr 27 02:57:14 UTC 2021
Useful for serving in-memory package files.
Signed-off-by: Andrew Gregory <andrew.gregory.8 at gmail.com>
---
test/pacman/pmserve.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/test/pacman/pmserve.py b/test/pacman/pmserve.py
index 47e041d0..b6de9797 100644
--- a/test/pacman/pmserve.py
+++ b/test/pacman/pmserve.py
@@ -78,6 +78,8 @@ def do_GET(self):
response.get('body', ''),
headers=response.get('headers', {}),
code=response.get('code', 200))
+ elif isinstance(response, bytes):
+ self.respond_bytes(response)
else:
self.respond_string(response)
else:
--
2.31.1
More information about the pacman-dev
mailing list