From d5c7952c38c7423b3d74ec84671220e3d7e7bdf6 Mon Sep 17 00:00:00 2001 From: Eason Kang Date: Tue, 26 Jul 2022 15:19:32 +0800 Subject: [PATCH] Correct regex pattern for uploadChunk's contentRange. --- lib/Api/ObjectsApi.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Api/ObjectsApi.php b/lib/Api/ObjectsApi.php index 0f797a2..7ec5113 100644 --- a/lib/Api/ObjectsApi.php +++ b/lib/Api/ObjectsApi.php @@ -1144,8 +1144,8 @@ public function uploadChunkWithHttpInfo($bucket_key, $object_name, $content_leng if ($content_range === null) { throw new \InvalidArgumentException('Missing the required parameter $content_range when calling uploadChunk'); } - if (!preg_match("/^bytes [0-9]+\\-[0-9]+/[0-9]+$/", $content_range)) { - throw new \InvalidArgumentException("invalid value for \"content_range\" when calling ObjectsApi.uploadChunk, must conform to the pattern /^bytes [0-9]+\\-[0-9]+/[0-9]+$/."); + if (!preg_match("/^bytes [0-9]+\-[0-9]+\/+[0-9]+$/", $content_range)) { + throw new \InvalidArgumentException("invalid value for \"content_range\" when calling ObjectsApi.uploadChunk, must conform to the pattern /^bytes [0-9]+\-[0-9]+\/+[0-9]+$/."); } // verify the required parameter 'session_id' is set