Skip to content

v0.0.113 parseRawHttpRequest 空指针 #108

Description

@lts120784620

Describe the bug
调用parseRawHttpRequest方法,不初始化req中的MethodOption调用会导致空指针panic

To Reproduce
// 把可读的 RawRequestReq ,解析为 http 请求的参数 rawHttpRequestParam
func (r *Lark) parseRawHttpRequest(ctx context.Context, req *RawRequestReq) (*rawHttpRequest, error) {
// 0 init
rawHttpReq := &rawHttpRequest{
Scope: req.Scope,
API: req.API,
Method: strings.ToUpper(req.Method),
Headers: map[string]string{},
URL: req.URL,
Timeout: r.timeout,
}
if req.MethodOption.timeout > 0 {
rawHttpReq.Timeout = req.MethodOption.timeout
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions