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,
|
IdleConnTimeout: keepAlive,
|
||||||
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
||||||
TLSHandshakeTimeout: 5 * time.Second,
|
TLSHandshakeTimeout: 5 * time.Second,
|
||||||
DisableKeepAlives: false,
|
DisableKeepAlives: true,
|
||||||
}
|
}
|
||||||
if DownProxy != "" {
|
if DownProxy != "" {
|
||||||
if DownProxy == "1" {
|
if DownProxy == "1" {
|
||||||
|
|
|
@ -591,9 +591,8 @@ func getRespBody(oResp *http.Response) ([]byte, error) {
|
||||||
body = append(body, buf...)
|
body = append(body, buf...)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
raw, err := ioutil.ReadAll(oResp.Body)
|
raw, err := ioutil.ReadAll(io.LimitReader(oResp.Body, int64(3<<20)))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
//utils.Logger.Error(err)
|
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
defer oResp.Body.Close()
|
defer oResp.Body.Close()
|
||||||
|
|
Loading…
Reference in New Issue