mirror of https://github.com/qwqdanchun/fscan.git
update http
This commit is contained in:
parent
dbb6f43fc1
commit
205021afec
|
@ -40,7 +40,7 @@ func InitHttpClient(ThreadsNum int, DownProxy string, Timeout time.Duration) err
|
|||
IdleConnTimeout: keepAlive,
|
||||
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
||||
TLSHandshakeTimeout: 5 * time.Second,
|
||||
DisableKeepAlives: false,
|
||||
DisableKeepAlives: true,
|
||||
}
|
||||
if DownProxy != "" {
|
||||
if DownProxy == "1" {
|
||||
|
|
|
@ -591,9 +591,8 @@ func getRespBody(oResp *http.Response) ([]byte, error) {
|
|||
body = append(body, buf...)
|
||||
}
|
||||
} else {
|
||||
raw, err := ioutil.ReadAll(oResp.Body)
|
||||
raw, err := ioutil.ReadAll(io.LimitReader(oResp.Body, int64(3<<20)))
|
||||
if err != nil {
|
||||
//utils.Logger.Error(err)
|
||||
return nil, err
|
||||
}
|
||||
defer oResp.Body.Close()
|
||||
|
|
Loading…
Reference in New Issue