From ab97d012cdb2084390e83f9f8c4eca0dfb99ac59 Mon Sep 17 00:00:00 2001 From: eson <474420502@qq.com> Date: Fri, 21 Dec 2018 18:15:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0scurl=E9=95=BF=E5=BA=A6?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parse_curl.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/parse_curl.go b/parse_curl.go index 018b848..eba65df 100644 --- a/parse_curl.go +++ b/parse_curl.go @@ -102,6 +102,10 @@ func ParseRawCURL(scurl string) (cURL *CURL) { executor := newPQueueExecute() curl := New() + if len(scurl) <= 4 { + panic("scurl error:" + scurl) + } + if scurl[0] == '"' && scurl[len(scurl)-1] == '"' { scurl = strings.Trim(scurl, `"`) } else if scurl[0] == '\'' && scurl[len(scurl)-1] == '\'' {