src/hg/lib/bamFile.c 1.15
1.15 2009/11/20 17:51:56 angie
Include http auth string in udcFuse path because udcFuse has no other way to get the auth.
Index: src/hg/lib/bamFile.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/lib/bamFile.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -b -B -U 4 -r1.14 -r1.15
--- src/hg/lib/bamFile.c 6 Nov 2009 18:09:55 -0000 1.14
+++ src/hg/lib/bamFile.c 20 Nov 2009 17:51:56 -0000 1.15
@@ -66,14 +66,16 @@
* both the .bam and .bai (index) URLs with udc here.
* If udcFuse is not configured, or fileOrUrl is not an URL, just pass through fileOrUrl. */
{
char *udcFuseRoot = cfgOption("udcFuse.mountPoint");
-char *protocol = NULL, *afterProtocol = NULL, *colon = NULL;
-udcParseUrl(fileOrUrl, &protocol, &afterProtocol, &colon);
+char *protocol = NULL, *afterProtocol = NULL, *colon = NULL, *auth = NULL;
+udcParseUrlFull(fileOrUrl, &protocol, &afterProtocol, &colon, &auth);
if (udcFuseRoot != NULL && afterProtocol != NULL)
{
struct dyString *dy = dyStringNew(0);
- dyStringPrintf(dy, "%s/%s/%s", udcFuseRoot, protocol, afterProtocol);
+ if (auth == NULL)
+ auth = "";
+ dyStringPrintf(dy, "%s/%s/%s%s", udcFuseRoot, protocol, auth, afterProtocol);
char *bamFileName = dyStringCannibalize(&dy);
if (!isRegularFile(bamFileName))
{
verbose(2, "going to call udcFileMayOpen(%s).\n", fileOrUrl);