+
+ if (options->check_file_server_time) {
+ file_options.time_condition = file_time;
+ }
+ if (options->use_etag) {
+ gchar *etag_filename = g_strdup_printf("%s.etag", fn);
+ gsize etag_length = 0;
+ g_file_get_contents (etag_filename, &(file_options.etag), &etag_length, NULL);
+ g_free (etag_filename);
+ etag_filename = NULL;
+
+ /* check if etag is short enough */
+ if (etag_length > 100) {
+ g_free(file_options.etag);
+ file_options.etag = NULL;
+ }
+
+ /* TODO: should check that etag is a valid string */
+ }
+