Skip to content

Commit

Permalink
v1.5.32
Browse files Browse the repository at this point in the history
  • Loading branch information
iGoogle-ink committed Mar 8, 2021
1 parent 28da1da commit 284974b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion constant.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const (
OK = "OK"
DebugOff = 0
DebugOn = 1
Version = "1.5.31"
Version = "1.5.32"
)

type DebugSwitch int8
8 changes: 5 additions & 3 deletions pkg/xhttp/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func NewClient() (client *Client) {
DisableKeepAlives: true,
},
},
Transport: &http.Transport{},
Transport: nil,
Header: make(http.Header),
requestType: TypeUrlencoded,
unmarshalType: string(TypeJSON),
Expand All @@ -146,7 +146,7 @@ func NewClient() (client *Client) {

func (c *Client) SetTLSConfig(tlsCfg *tls.Config) (client *Client) {
c.mu.Lock()
c.Transport.TLSClientConfig = tlsCfg
c.Transport = &http.Transport{TLSClientConfig: tlsCfg, DisableKeepAlives: true}
c.mu.Unlock()
return c
}
Expand Down Expand Up @@ -383,7 +383,9 @@ func (c *Client) EndBytes() (res *http.Response, bs []byte, errs []error) {
}
req.Header = c.Header
req.Header.Set("Content-Type", c.ContentType)
c.HttpClient.Transport = c.Transport
if c.Transport != nil {
c.HttpClient.Transport = c.Transport
}
return req, nil
}()
if err != nil {
Expand Down
4 changes: 4 additions & 0 deletions release_note.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
版本号:Release 1.5.32
修改记录:
(1) xhttp:Fix bug about Transport

版本号:Release 1.5.31
修改记录:
(1) 微信:新增服务商支付接口
Expand Down

0 comments on commit 284974b

Please sign in to comment.