code: func (handler *UnroutedHandler) validateNewUploadLengthHeaders(uploadLengthHeader string, uploadDeferLengthHeader string) (uploadLength int64, uploadLengthDeferred bool, err error) {
  	haveBothLengthHeaders := uploadLengthHeader != "" && uploadDeferLengthHeader != ""
  	haveInvalidDeferHeader := uploadDeferLengthHeader != "" && uploadDeferLengthHeader != UploadLengthDeferred
  	lengthIsDeferred := uploadDeferLengthHeader == UploadLengthDeferred
  
  	if lengthIsDeferred && !handler.composer.UsesLengthDeferrer {
  		err = ErrNotImplemented
  	} else if haveBothLengthHeaders {
  		err = ErrUploadLengthAndUploadDeferLength
  	} else if haveInvalidDeferHeader {
  		err = ErrInvalidUploadDeferLength
  	} else if lengthIsDeferred {
  		uploadLengthDeferred = true
  	} else {
  		uploadLength, err = strconv.ParseInt(uploadLengthHeader, 10, 64)
  		if err != nil || uploadLength < 0 {
  			err = ErrInvalidUploadLength
  		}
  	}
  
  	return
  }
docs: // Verify that the Upload-Length and Upload-Defer-Length headers are acceptable for creating a
  // new upload