Skip to content

Commit ee8db7a

Browse files
committed
Fixed assignment to entry in nil map
1 parent a13d012 commit ee8db7a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rpc/http_client.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* *
1313
* hprose http client for Go. *
1414
* *
15-
* LastModified: Nov 1, 2016 *
15+
* LastModified: Nov 20, 2016 *
1616
* Author: Ma Bingyao <[email protected]> *
1717
* *
1818
\**********************************************************/
@@ -49,6 +49,7 @@ func NewHTTPClient(uri ...string) (client *HTTPClient) {
4949
client.InitBaseClient()
5050
client.limiter.InitLimiter()
5151
client.httpClient.Transport = &client.Transport
52+
client.Header = make(http.Header)
5253
client.DisableCompression = true
5354
client.DisableKeepAlives = false
5455
client.MaxIdleConnsPerHost = 10

0 commit comments

Comments
 (0)