修复HTTP Client相关测试用例

This commit is contained in:
GoEdgeLab
2024-04-21 15:13:45 +08:00
parent 5c97d0d3cf
commit 8b7117a63b
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
}