Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
b3c46a87
Commit
b3c46a87
authored
Jul 05, 2018
by
Colstuwjx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: correct MaxIdleConnsPerHost value to net/http default 100.
parent
f1668881
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
httplib.go
httplib/httplib.go
+3
-1
No files found.
httplib/httplib.go
View file @
b3c46a87
...
...
@@ -317,6 +317,7 @@ func (b *BeegoHTTPRequest) Body(data interface{}) *BeegoHTTPRequest {
}
return
b
}
// XMLBody adds request raw body encoding by XML.
func
(
b
*
BeegoHTTPRequest
)
XMLBody
(
obj
interface
{})
(
*
BeegoHTTPRequest
,
error
)
{
if
b
.
req
.
Body
==
nil
&&
obj
!=
nil
{
...
...
@@ -330,6 +331,7 @@ func (b *BeegoHTTPRequest) XMLBody(obj interface{}) (*BeegoHTTPRequest, error) {
}
return
b
,
nil
}
// JSONBody adds request raw body encoding by JSON.
func
(
b
*
BeegoHTTPRequest
)
JSONBody
(
obj
interface
{})
(
*
BeegoHTTPRequest
,
error
)
{
if
b
.
req
.
Body
==
nil
&&
obj
!=
nil
{
...
...
@@ -444,7 +446,7 @@ func (b *BeegoHTTPRequest) DoRequest() (resp *http.Response, err error) {
TLSClientConfig
:
b
.
setting
.
TLSClientConfig
,
Proxy
:
b
.
setting
.
Proxy
,
Dial
:
TimeoutDialer
(
b
.
setting
.
ConnectTimeout
,
b
.
setting
.
ReadWriteTimeout
),
MaxIdleConnsPerHost
:
-
1
,
MaxIdleConnsPerHost
:
100
,
}
}
else
{
// if b.transport is *http.Transport then set the settings.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment