src/lib/udc.c 1.14

1.14 2009/03/10 00:31:04 galt
adding https support
Index: src/lib/udc.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/lib/udc.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -b -B -U 4 -r1.13 -r1.14
--- src/lib/udc.c	18 Feb 2009 00:33:25 -0000	1.13
+++ src/lib/udc.c	10 Mar 2009 00:31:04 -0000	1.14
@@ -217,9 +217,9 @@
  * error.  Typically will be called with size in the 8k - 64k range. */
 {
 verbose(2, "reading http data - %d bytes at %lld - on %s\n", size, offset, url);
 char rangeUrl[1024];
-if (!startsWith("http://",url))
+if (!(startsWith("http://",url) || startsWith("https://",url)))
     errAbort("Invalid protocol in url [%s] in udcDataViaHttp, only http supported", url); 
 safef(rangeUrl, sizeof(rangeUrl), "%s;byterange=%lld-%lld"
   , url
   , (long long) offset
@@ -485,9 +485,9 @@
     {
     prot->fetchData = udcDataViaSlow;
     prot->fetchInfo = udcInfoViaSlow;
     }
-else if (sameString(upToColon, "http"))
+else if (sameString(upToColon, "http") || sameString(upToColon, "https"))
     {
     prot->fetchData = udcDataViaHttp;
     prot->fetchInfo = udcInfoViaHttp;
     }