+ if (calcoutfile && !outfile) {
+ tls_parse_uri(url, &uri);
+ outfile = pathlast(uri.path);
+ /* outfile leaks memory here, so if this
+ * were turned into a library function,
+ * we'd need to track it
+ */
+ if (!outfile) {
+ fprintf(stderr, "unable to determine outfile\n");
+ exit(EXIT_FAILURE);
+ }
+ }
+