mirror of
https://github.com/lkmio/lkm.git
synced 2025-09-26 19:21:14 +08:00
非法请求不再painc
This commit is contained in:
@@ -102,7 +102,7 @@ func parseMessage(data []byte) (string, *url.URL, textproto.MIMEHeader, error) {
|
||||
line, err := tp.ReadLine()
|
||||
split := strings.Split(line, " ")
|
||||
if len(split) < 3 {
|
||||
panic(fmt.Errorf("wrong request line %s", line))
|
||||
return "", nil, nil, fmt.Errorf("wrong request line %s", line)
|
||||
}
|
||||
|
||||
method := strings.ToUpper(split[0])
|
||||
|
Reference in New Issue
Block a user