Why http.HandleFunc execute two times for one request? : <p>I build a very simple web sever with golang to understand the http package, but I find the HandleFunc function executed two times for one request, and there's a favicon.ico I have not expected.</p>

<p>Here's the web server code:</p>

<pre class="lang-golang prettyprint-override"><code>package main

import (
    "fmt"
    "log"
    "net/http"
    "strings"
)

// sayHelloName a basic web function
func sayHelloName(w http.ResponseWriter, r *http.Request) {
    r.ParseForm() // Parse parameters
    fmt.Println(r.Form)
    fmt.Println("path", r.URL.Path)
    fmt.Println("scheme", r.URL.Scheme)
    fmt.Println(r.Form["url_long"])

    for k, v := range r.Form {
        fmt.Println("key", k)
        fmt.Println("val", strings.Join(v, ""))
    }

    fmt.Fprintf(w, "hello Go-web")
}

func main() {
    http.HandleFunc("/", sayHelloName)
    // log.Println("Serve listen at http://localhost:8900/")
    err := http.ListenAndServe(":8900", nil)

    if err != nil {
        log.Fatal("Listen &amp; Serve Error", err)
    }
}
</code></pre>

<h2>visit <code>http://localhost:9090/?url_long=111&amp;url_long=222</code></h2>

<p><strong>Real Output</strong><br/>
map[url_long:[111 222]]<br/>
path /<br/>
scheme <br/>
[111 222]<br/>
key url_long<br/>
val 111222<br/>
map[]<br/>
path /favicon.ico<br/>
scheme <br/>
[]<br/>
<strong>I don't understand why there's a favicon.ico here.</strong><br/>
Any help will be appreciated.</p>
