mirror of
https://github.com/lkmio/lkm.git
synced 2025-10-04 14:52:44 +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()
|
line, err := tp.ReadLine()
|
||||||
split := strings.Split(line, " ")
|
split := strings.Split(line, " ")
|
||||||
if len(split) < 3 {
|
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])
|
method := strings.ToUpper(split[0])
|
||||||
|
Reference in New Issue
Block a user