Skip to content

armgit / hey

Public Imported from GitHub
0

HTTP load generator, ApacheBench (ab) replacement

Go

preset ContentLength in first http.Request (#48)

presbrey32f75cf06887
diff --git a/hey.go b/hey.go
index 97dff0f..120e9f0 100644
--- a/hey.go
+++ b/hey.go
@@ -182,6 +182,7 @@ func main() {
if err != nil {
usageAndExit(err.Error())
}
+ req.ContentLength = int64(len(bodyAll))
req.Header = header
if username != "" || password != "" {
req.SetBasicAuth(username, password)