We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 526bfd9 commit 1593493Copy full SHA for 1593493
simplehttpserver.go
@@ -48,7 +48,7 @@ func main() {
48
log.Printf("Serving %s on http://%s/...", opts.Folder, opts.ListenAddress)
49
layers := loglayer(http.FileServer(http.Dir(opts.Folder)))
50
if opts.BasicAuth != "" {
51
- baTokens := strings.SplitN(opts.BasicAuth, ":", 1)
+ baTokens := strings.SplitN(opts.BasicAuth, ":", 2)
52
if len(baTokens) > 0 {
53
opts.username = baTokens[0]
54
}
0 commit comments