HTTP load generator, ApacheBench (ab) replacement
Go
Use existing serverName variable
Mat Evans6654173e1cab
diff --git a/boom.go b/boom.goindex 3bfdc3d..cd241cc 100644--- a/boom.go+++ b/boom.go@@ -151,7 +151,6 @@ func main() {Url: url,Body: *flagD,Header: header,- Host: serverName,Username: username,Password: password,ServerName: serverName,diff --git a/commands/boom.go b/commands/boom.goindex 859d96b..6bf8347 100644--- a/commands/boom.go+++ b/commands/boom.go@@ -33,7 +33,6 @@ type ReqOpts struct {Method stringUrl stringHeader http.Header- Host stringBody stringUsername stringPassword string@@ -48,7 +47,7 @@ func (r *ReqOpts) Request() *http.Request {req.Header = r.Header// update the Host value in the Request - this is used as the host header in any subsequent request- req.Host = r.Host+ req.Host = r.ServerNameif r.Username != "" && r.Password != "" {req.SetBasicAuth(r.Username, r.Password)