添加scurl长度错误检测

This commit is contained in:
eson 2018-12-21 18:15:18 +08:00
parent cff0a27aa0
commit ab97d012cd

View File

@ -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] == '\'' {