// parseContentLength trims whitespace from s and returns -1 if no value
// is set, or the value if it's >= 0.
parseContentLength trims whitespace from s and returns -1 if no value
is set, or the value if it's >= 0.
// parseContentLength trims whitespace from s and returns - 1 if no value // is set or the value if it ' s > = 0 .
func parseContentLength(cl string) (int64, error) {
	cl = textproto.TrimString(cl)
	if cl == "" {
		return -1, nil
	}
	n, err := strconv.ParseUint(cl, 10, 63)
	if err != nil {
		return 0, badStringError("bad Content-Length", cl)
	}
	return int64(n), nil
}
func parseContentLength ( cl string ) ( int64 , error ) { cl = textproto . TrimString ( cl ) if cl == " " { return - 1 , nil } n , err := strconv . ParseUint ( cl , 10 , 63 ) if err != nil { return 0 , badStringError ( " " , cl ) } return int64 ( n ) , nil }
parseContentLength trims whitespace from s and returns -1 if no value
is set, or the value if it's >= 0.
parseContentLength trims whitespace from s and returns - 1 if no value is set or the value if it ' s > = 0 .