From 5899011c8d9e2bbdef12e84dc3e237475a6c06fd Mon Sep 17 00:00:00 2001 From: Paul Woods Date: Mon, 8 Aug 2022 20:36:56 +0200 Subject: [PATCH] added ; to regex pattern in __deserialize_file() The reason for not adding ? at the end is that otherwise re group will match it too. --- asposepdfcloud/api_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asposepdfcloud/api_client.py b/asposepdfcloud/api_client.py index 59ab8ee..15b5f42 100644 --- a/asposepdfcloud/api_client.py +++ b/asposepdfcloud/api_client.py @@ -597,7 +597,7 @@ def __deserialize_file(self, response): content_disposition = response.getheader("Content-Disposition") if content_disposition and content_disposition != "attachment": filename = re.\ - search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition).\ + search(r'filename=[\'"]?([^\'"\s]+)[\'"]?;', content_disposition).\ group(1) path = os.path.join(os.path.dirname(path), filename)