Skip to content

armgit / hey

Public Imported from GitHub
0

HTTP load generator, ApacheBench (ab) replacement

Go

Fix http auth regex to allow dash, dot and underscore, refs #36

Mario Behrendtf17a096c3810
diff --git a/boom.go b/boom.go
index e8a999a..46372bd 100644
--- a/boom.go
+++ b/boom.go
@@ -128,7 +128,7 @@ func main() {
// set basic auth if set
if *flagAuth != "" {
- re := regexp.MustCompile("(\\w+):(\\w+)")
+ re := regexp.MustCompile("([\\w|\\-|_|\\.]+):(\\w+)")
matches := re.FindAllStringSubmatch(*flagAuth, -1)
if len(matches) < 1 {
usageAndExit("")