bebcb6453c54164564b24899c6f407310b551a93
max
  Thu Jan 5 06:37:34 2023 -0800
first go at s3:// support, refs #30445

adding cache file to UDC protocol support, refs #30445

handling expired presigned URLs in udc protocol, refs #30445

diff --git src/hg/lib/hui.c src/hg/lib/hui.c
index 68ed7c6..954010d 100644
--- src/hg/lib/hui.c
+++ src/hg/lib/hui.c
@@ -623,30 +623,42 @@
 
 void setUdcCacheDir()
 /* set the path to the udc cache dir */
 {
 if (cfgOptionBooleanDefault("udc.useLocalDiskCache", TRUE))
     {
     char *cacheDir = getenv("UDC_CACHEDIR");
     if (isEmpty(cacheDir))
         cacheDir = cfgOptionDefault("udc.cacheDir", udcDefaultDir());
     udcSetDefaultDir(cacheDir);
     }
 else
     udcDisableCache();
 }
 
+void setUdcOptions(struct cart *cart)
+/* do udc setup: set timeout and resolver and anything else that requires cart or hg.conf */
+{
+setUdcTimeout(cart);
+
+char *prots = cfgOption("resolvProts");
+char *cmd = cfgOption("resolvCmd");
+
+if (prots && cmd)
+        udcSetResolver(prots, cmd);
+}
+
 
 char *wrapWhiteFont(char *s)
 /* Write white font around s */
 {
 static char buf[256];
 safef(buf, sizeof(buf), "<span style='color:#FFFFFF;'>%s</span>", s);
 return buf;
 }
 
 char *hDocumentRoot()
 /* get the path to the DocumentRoot, or the default */
 {
 return cfgOptionDefault("browser.documentRoot", DOCUMENT_ROOT);
 }