File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -139,10 +139,13 @@ func createHTTPRequest(c *Client, r *Request) (err error) {
139
139
r .RawRequest , err = http .NewRequest (r .Method , r .URL , r .bodyBuf )
140
140
}
141
141
142
- if err = = nil {
143
- r . RawRequest . Close = c . closeConnection
142
+ if err ! = nil {
143
+ return
144
144
}
145
145
146
+ // Assign close connection option
147
+ r .RawRequest .Close = c .closeConnection
148
+
146
149
// Add headers into http request
147
150
r .RawRequest .Header = r .Header
148
151
@@ -151,6 +154,7 @@ func createHTTPRequest(c *Client, r *Request) (err error) {
151
154
r .RawRequest .AddCookie (cookie )
152
155
}
153
156
157
+ // it's for non-http scheme option
154
158
if r .RawRequest .URL != nil && r .RawRequest .URL .Scheme == "" {
155
159
r .RawRequest .URL .Scheme = c .scheme
156
160
r .RawRequest .URL .Host = r .URL
You can’t perform that action at this time.
0 commit comments