Style fixes

This commit is contained in:
Leonid Bugaev
2015-08-03 18:08:35 +03:00
parent dd68d07c75
commit 961d5a754c
3 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ type HTTPClientConfig struct {
FollowRedirects int
Debug bool
OriginalHost bool
Timeout time.Duration
Timeout time.Duration
}
type HTTPClient struct {
@@ -137,7 +137,7 @@ func (c *HTTPClient) Send(data []byte) (response []byte, err error) {
c.conn.SetReadDeadline(timeout)
n, err := c.conn.Read(c.respBuf)
// If response large then our buffer, we need to read all reponse buffer
// If response large then our buffer, we need to read all response buffer
// Otherwise it will corrupt response of next request
// Parsing response body is non trivial thing, especially with keep-alive
// Simples case is to to close connection if response too large
+3 -3
View File
@@ -1,6 +1,8 @@
package main
import (
"bytes"
"crypto/rand"
"io/ioutil"
"net"
"net/http"
@@ -8,8 +10,6 @@ import (
"net/http/httputil"
"sync"
"testing"
"crypto/rand"
"bytes"
_ "time"
)
@@ -100,7 +100,7 @@ func TestHTTPClientResponseBuffer(t *testing.T) {
wg.Done()
}))
client := NewHTTPClient(server.URL, &HTTPClientConfig{Debug: true})
client := NewHTTPClient(server.URL, &HTTPClientConfig{Debug: false})
wg.Add(2)
client.Send(payload)
+2 -2
View File
@@ -18,7 +18,7 @@ type HTTPOutputConfig struct {
elasticSearch string
Timeout time.Duration
Timeout time.Duration
OriginalHost bool
Debug bool
@@ -98,7 +98,7 @@ func (o *HTTPOutput) startWorker() {
FollowRedirects: o.config.redirectLimit,
Debug: o.config.Debug,
OriginalHost: o.config.OriginalHost,
Timeout: o.config.Timeout,
Timeout: o.config.Timeout,
})
deathCount := 0