Encode spaces to %20 for explicit query

This commit is contained in:
Mikhail Klementyev 2016-07-23 00:40:12 +03:00
parent 4a4b04e12e
commit 37ae632189

View File

@ -34,7 +34,8 @@ var (
func cmd_url(db *sql.DB, url string) { func cmd_url(db *sql.DB, url string) {
client := &http.Client{} client := &http.Client{}
req, err := http.NewRequest("GET", url, nil) // TODO Full url encoding
req, err := http.NewRequest("GET", strings.Replace(url, " ", "%20", -1), nil)
if err != nil { if err != nil {
log.Fatalln(err) log.Fatalln(err)
} }