Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for PunycodeHostPort (0.17 sec)

  1. src/vendor/golang.org/x/net/http/httpguts/httplex.go

    func isASCII(s string) bool {
    	for i := 0; i < len(s); i++ {
    		if s[i] >= utf8.RuneSelf {
    			return false
    		}
    	}
    	return true
    }
    
    // PunycodeHostPort returns the IDNA Punycode version
    // of the provided "host" or "host:port" string.
    func PunycodeHostPort(v string) (string, error) {
    	if isASCII(v) {
    		return v, nil
    	}
    
    	host, port, err := net.SplitHostPort(v)
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  2. src/net/http/request.go

    	// Clean the host, in case it arrives with unexpected stuff in it.
    	host := r.Host
    	if host == "" {
    		if r.URL == nil {
    			return errMissingHost
    		}
    		host = r.URL.Host
    	}
    	host, err = httpguts.PunycodeHostPort(host)
    	if err != nil {
    		return err
    	}
    	// Validate that the Host header is a valid header in general,
    	// but don't validate the host itself. This is sufficient to avoid
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 49.4K bytes
    - Viewed (0)
  3. src/net/http/h2_bundle.go

    	cc.hbuf.Reset()
    	if req.URL == nil {
    		return nil, http2errNilRequestURL
    	}
    
    	host := req.Host
    	if host == "" {
    		host = req.URL.Host
    	}
    	host, err := httpguts.PunycodeHostPort(host)
    	if err != nil {
    		return nil, err
    	}
    	if !httpguts.ValidHostHeader(host) {
    		return nil, errors.New("http2: invalid Host header")
    	}
    
    	var path string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 364.1K bytes
    - Viewed (0)
Back to top