Closed D3coded closed 5 years ago
Umm, thanks,
I hope to fix it someday. I want someone's Pull Request.
workaround until the problem is fixed:
userInfo := url.UserPassword("user", "!password?").String()
dsn := userInfo + "@localhost:3050/dbname"
thanks, @bat22
I realize connection string has URL encoded.
package main
import (
"fmt"
"net/url"
)
func main() {
userInfo := url.UserPassword("user", "!p@ssword?").String()
dsn := userInfo + "@localhost:3050/dbname"
fmt.Println(dsn)
}
user:%21p%40ssword%3F@localhost:3050/dbname
The following test case fails, because the password part includes a "?".
{"user:!password?@localhost/c:/fbdata/database.fdb", "localhost:3050", "c:/fbdata/database.fdb", "user", "!password?", "", "Srp", "true"}
I guess it fails in the package "net\url" in the function "parseAuthority" called here
Test result:
My go version: go1.11.2 windows/amd64