Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for stringContainsCTLByte (0.29 sec)

  1. src/net/http/http.go

    	if hasPort(host) {
    		return strings.TrimSuffix(host, ":")
    	}
    	return host
    }
    
    func isNotToken(r rune) bool {
    	return !httpguts.IsTokenRune(r)
    }
    
    // stringContainsCTLByte reports whether s contains any ASCII control character.
    func stringContainsCTLByte(s string) bool {
    	for i := 0; i < len(s); i++ {
    		b := s[i]
    		if b < ' ' || b == 0x7f {
    			return true
    		}
    	}
    	return false
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  2. src/net/url/url.go

    			'(', ')', '*', '+', ',', ';', '=', '%', '@':
    			continue
    		default:
    			return false
    		}
    	}
    	return true
    }
    
    // stringContainsCTLByte reports whether s contains any ASCII control character.
    func stringContainsCTLByte(s string) bool {
    	for i := 0; i < len(s); i++ {
    		b := s[i]
    		if b < ' ' || b == 0x7f {
    			return true
    		}
    	}
    	return false
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:53 UTC 2024
    - 36.1K bytes
    - Viewed (0)
  3. src/net/http/request.go

    		// CONNECT requests normally give just the host and port, not a full URL.
    		ruri = host
    		if r.URL.Opaque != "" {
    			ruri = r.URL.Opaque
    		}
    	}
    	if stringContainsCTLByte(ruri) {
    		return errors.New("net/http: can't write control character in Request.URL")
    	}
    	// TODO: validate r.Method too? At least it's less likely to
    	// come from an attacker (more likely to be a constant in
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 49.4K bytes
    - Viewed (0)
Back to top