Skip to content

Commit 1593493

Browse files
committed
fixing split amount
1 parent 526bfd9 commit 1593493

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

simplehttpserver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func main() {
4848
log.Printf("Serving %s on http://%s/...", opts.Folder, opts.ListenAddress)
4949
layers := loglayer(http.FileServer(http.Dir(opts.Folder)))
5050
if opts.BasicAuth != "" {
51-
baTokens := strings.SplitN(opts.BasicAuth, ":", 1)
51+
baTokens := strings.SplitN(opts.BasicAuth, ":", 2)
5252
if len(baTokens) > 0 {
5353
opts.username = baTokens[0]
5454
}

0 commit comments

Comments
 (0)