Projects STRLCPY csprecon Commits 4f81e1cb
🤬
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■ ■
    pkg/csprecon/csp.go
    skipped 24 lines
    25 25   bodyCSP []string
    26 26   )
    27 27   
    28  - resp, err := client.Get(url)
     28 + req, err := http.NewRequest(http.MethodGet, url, nil)
     29 + if err != nil {
     30 + return result, err
     31 + }
     32 + 
     33 + resp, err := client.Do(req)
    29 34   if err != nil {
    30 35   return result, err
    31 36   }
    skipped 68 lines
    100 105  }
    101 106   
    102 107  func customClient(timeout int) *http.Client {
    103  - //ref: Copy and modify defaults from https://golang.org/src/net/http/transport.go
    104  - //Note: Clients and Transports should only be created once and reused
    105 108   transport := http.Transport{
    106 109   TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
    107  - Proxy: http.ProxyFromEnvironment,
    108 110   Dial: (&net.Dialer{
    109  - // Modify the time to wait for a connection to establish
    110 111   Timeout: time.Duration(timeout) * time.Second,
    111 112   KeepAlive: KeepAlive * time.Second,
    112 113   }).Dial,
    skipped 17 lines
  • ■ ■ ■ ■ ■ ■
    pkg/csprecon/csprecon.go
    skipped 104 lines
    105 105   }
    106 106   }
    107 107   }
     108 + } else {
     109 + if r.Options.Verbose {
     110 + gologger.Error().Msgf("%s", err)
     111 + }
    108 112   }
    109 113   }(value)
    110 114   }
    skipped 37 lines
Please wait...
Page is in error, reload to recover