"net/http/httptrace"
"net/textproto"
"net/url"
+ urlpkg "net/url"
"strconv"
"strings"
"sync"
if ctx == nil {
return nil, errors.New("net/http: nil Context")
}
- u, err := parseURL(url) // Just url.Parse (url is shadowed for godoc).
+ u, err := urlpkg.Parse(url)
if err != nil {
return nil, err
}
"net"
"net/textproto"
"net/url"
+ urlpkg "net/url"
"os"
"path"
"runtime"
// Setting the Content-Type header to any value, including nil,
// disables that behavior.
func Redirect(w ResponseWriter, r *Request, url string, code int) {
- // parseURL is just url.Parse (url is shadowed for godoc).
- if u, err := parseURL(url); err == nil {
+ if u, err := urlpkg.Parse(url); err == nil {
// If url was relative, make its path absolute by
// combining with request path.
// The client would probably do this for us,
}
}
-// parseURL is just url.Parse. It exists only so that url.Parse can be called
-// in places where url is shadowed for godoc. See https://golang.org/cl/49930.
-var parseURL = url.Parse
-
var htmlReplacer = strings.NewReplacer(
"&", "&",
"<", "<",