code: func parseAccept(v string) (accept, error) {
  	if v == "" {
  		return nil, nil
  	}
  
  	var result accept
  	for _, t := range strings.Split(v, ",") {
  		t = strings.TrimSpace(t)
  		if t == "" {
  			return nil, fmt.Errorf("no media type")
  		}
  		mediaType, qValue, _ := qParamSplit(t)
  		at := acceptType{QualityFactor: 1.0}
  		var err error
  		at.MediaType, at.MediaTypeParams, err = mime.ParseMediaType(mediaType)
  		if err != nil {
  			return nil, fmt.Errorf("%s", strings.TrimPrefix(err.Error(), "mime: "))
  		}
  		if qValue != "" {
  			qualityFactor, err := strconv.ParseFloat(qValue, 32)
  			if err != nil {
  				return nil, fmt.Errorf("q parameter: expected a floating-point number")
  			}
  			at.QualityFactor = float32(qualityFactor)
  		}
  		result = append(result, at)
  	}
  	return result, nil
  }
docs: // parseAccept parses an "Accept" HTTP header.
  //
  // See spec http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
  // Roughly:
  // - accept is a list of types separated by ","
  // - a type is like media type, except q parameter separates
  //   media type parameters and accept parameters.
  // - q is quality factor.
  //
  // This implementation is slow. Does not support accept params.