mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-17 13:53:41 +00:00
fix: test
This commit is contained in:
1 parent
91ac841b9d
commit
b8e36b483e
2 files changed
+5
-7
No files matched your search
@@ -451,10 +451,11 @@ func (f *Fetcher) splitChunk() (chunks []*chunk) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (f *Fetcher) buildClient() *http.Client {
|
func (f *Fetcher) buildClient() *http.Client {
|
||||||
transport := &http.Transport{}
|
transport := &http.Transport{
|
||||||
|
Proxy: f.ctl.ProxyConfig.ToHandler(),
|
||||||
|
}
|
||||||
// Cookie handle
|
// Cookie handle
|
||||||
jar, _ := cookiejar.New(nil)
|
jar, _ := cookiejar.New(nil)
|
||||||
transport.Proxy = f.ctl.ProxyConfig.ToHandler()
|
|
||||||
return &http.Client{
|
return &http.Client{
|
||||||
Transport: transport,
|
Transport: transport,
|
||||||
Jar: jar,
|
Jar: jar,
|
||||||
|
|||||||
@@ -203,11 +203,8 @@ func (xhr *XMLHttpRequest) Send(data goja.Value) {
|
|||||||
for k, v := range xhr.requestHeaders {
|
for k, v := range xhr.requestHeaders {
|
||||||
req.Header.Set(k, v)
|
req.Header.Set(k, v)
|
||||||
}
|
}
|
||||||
var transport *http.Transport
|
transport := &http.Transport{
|
||||||
if xhr.proxyHandler != nil {
|
Proxy: xhr.proxyHandler,
|
||||||
transport = &http.Transport{
|
|
||||||
Proxy: xhr.proxyHandler,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
client := &http.Client{
|
client := &http.Client{
|
||||||
Transport: transport,
|
Transport: transport,
|
||||||
|
|||||||
Reference in new issue
Block a user