From eeeefb0534678a0df6945171c0aafcd88a5fda31 Mon Sep 17 00:00:00 2001 From: kim Date: Tue, 18 Apr 2023 18:10:21 +0800 Subject: [PATCH] Update multipart.lua Payload: multipart/form-data; boundary=6uPJdiTx1BvOyBOcFbt2eQN7tuBo3ZaYUmbFxoh; charset=UTF-8 This will add ";" to the end of the boundary: local boundary = match(content_type, ";%s*boundary=(%S+)") --- src/multipart.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/multipart.lua b/src/multipart.lua index bab9251..6641f7a 100644 --- a/src/multipart.lua +++ b/src/multipart.lua @@ -227,7 +227,7 @@ function MultipartData.new(data, content_type) local instance = setmetatable({}, MultipartData) if content_type then - local boundary = match(content_type, ";%s*boundary=(%S+)") + local boundary = match(content_type, ";%s*boundary=([^;%s]+)") if boundary then if (sub(boundary, 1, 1) == '"' and sub(boundary, -1) == '"') or (sub(boundary, 1, 1) == "'" and sub(boundary, -1) == "'") then