修复HTTP Client相关测试用例

This commit is contained in:
刘祥超
2024-04-21 15:13:45 +08:00
parent 73e6b04026
commit 6c5f4e0705
2 changed files with 13 additions and 5 deletions

View File

@@ -59,7 +59,7 @@ func (this *HTTPClientPool) Client(req *HTTPRequest,
return nil, errors.New("origin addr should not be empty (originId:" + strconv.FormatInt(origin.Id, 10) + ")")
}
if req.RawReq.URL == nil {
if req == nil || req.RawReq == nil || req.RawReq.URL == nil {
err = errors.New("invalid request url")
return
}