From db820445e53816c30bdcace65423e274c4f6b29a Mon Sep 17 00:00:00 2001 From: Tessa Walsh Date: Thu, 7 Nov 2024 15:09:04 -0500 Subject: [PATCH] Try feeding in stream as BytesIO --- cdxj_indexer/postquery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cdxj_indexer/postquery.py b/cdxj_indexer/postquery.py index 01edbf8..911313c 100644 --- a/cdxj_indexer/postquery.py +++ b/cdxj_indexer/postquery.py @@ -105,7 +105,7 @@ def handle_binary(query_data): try: boundary = mime.split("boundary=")[1] - parser = MultipartParser(stream, boundary, charset="utf8") + parser = MultipartParser(BytesIO(query_data), boundary, charset="utf8") except (ValueError, IndexError): # Content-Type multipart/form-data may lack "boundary" info query = handle_binary(query_data)