int u_init_compressed_inmemory_website_config(struct _u_compressed_inmemory_website_config * config) {
  int ret = U_OK;
  pthread_mutexattr_t mutexattr;

  if (config != NULL) {
    config->files_path                 = NULL;
    config->url_prefix                 = NULL;
    config->redirect_on_404            = NULL;
    config->allow_gzip                 = 1;
    config->allow_deflate              = 1;
    config->mime_types_compressed      = NULL;
    config->mime_types_compressed_size = 0;
    config->allow_cache_compressed     = 1;
    if ((ret = u_map_init(&(config->mime_types))) != U_OK) {
      y_log_message(Y_LOG_LEVEL_ERROR, "u_init_compressed_inmemory_website_config - Error u_map_init mime_types");
    } else if ((ret = u_map_init(&(config->map_header))) != U_OK) {
      y_log_message(Y_LOG_LEVEL_ERROR, "u_init_compressed_inmemory_website_config - Error u_map_init map_header");
    } else if ((ret = u_map_init(&(config->gzip_files))) != U_OK) {
      y_log_message(Y_LOG_LEVEL_ERROR, "u_init_compressed_inmemory_website_config - Error u_map_init gzip_files");
    } else if ((ret = u_map_init(&(config->deflate_files))) != U_OK) {
      y_log_message(Y_LOG_LEVEL_ERROR, "u_init_compressed_inmemory_website_config - Error u_map_init deflate_files");
    } else {
      pthread_mutexattr_init (&mutexattr);
      pthread_mutexattr_settype(&mutexattr, PTHREAD_MUTEX_RECURSIVE);
      if (pthread_mutex_init(&(config->lock), &mutexattr) != 0) {
        y_log_message(Y_LOG_LEVEL_ERROR, "u_init_compressed_inmemory_website_config - Error pthread_mutex_init");
        ret = U_ERROR;
      }
    }
  }
  return ret;
}
int u_init_compressed_inmemory_website_config(struct _u_compressed_inmemory_website_config * config) {
  int ret = U_OK;
  pthread_mutexattr_t mutexattr;

  if (config != NULL) {
    config->files_path                 = NULL;
    config->url_prefix                 = NULL;
    config->redirect_on_404            = NULL;
    config->allow_gzip                 = 1;
    config->allow_deflate              = 1;
    config->mime_types_compressed      = NULL;
    config->mime_types_compressed_size = 0;
    config->allow_cache_compressed     = 1;
    if ((ret = u_map_init(&(config->mime_types))) != U_OK) {
      y_log_message(Y_LOG_LEVEL_ERROR, "u_init_compressed_inmemory_website_config - Error u_map_init mime_types");
    } else if ((ret = u_map_init(&(config->map_header))) != U_OK) {
      y_log_message(Y_LOG_LEVEL_ERROR, "u_init_compressed_inmemory_website_config - Error u_map_init map_header");
    } else if ((ret = u_map_init(&(config->gzip_files))) != U_OK) {
      y_log_message(Y_LOG_LEVEL_ERROR, "u_init_compressed_inmemory_website_config - Error u_map_init gzip_files");
    } else if ((ret = u_map_init(&(config->deflate_files))) != U_OK) {
      y_log_message(Y_LOG_LEVEL_ERROR, "u_init_compressed_inmemory_website_config - Error u_map_init deflate_files");
    } else {
      pthread_mutexattr_init (&mutexattr);
      pthread_mutexattr_settype(&mutexattr, PTHREAD_MUTEX_RECURSIVE);
      if (pthread_mutex_init(&(config->lock), &mutexattr) != 0) {
        y_log_message(Y_LOG_LEVEL_ERROR, "u_init_compressed_inmemory_website_config - Error pthread_mutex_init");
        ret = U_ERROR;
      }
    }
  }
  return ret;
}