src/hg/lib/customFactory.c 1.101

1.101 2009/08/18 22:31:14 galt
better err handling for URL redirect
Index: src/hg/lib/customFactory.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/lib/customFactory.c,v
retrieving revision 1.100
retrieving revision 1.101
diff -b -B -U 4 -r1.100 -r1.101
--- src/hg/lib/customFactory.c	13 Aug 2009 19:57:52 -0000	1.100
+++ src/hg/lib/customFactory.c	18 Aug 2009 22:31:14 -0000	1.101
@@ -1680,9 +1680,10 @@
     if (sd >= 0)
         {
 	char *newUrl = NULL;
 	int newSd = 0;
-        netSkipHttpHeaderLinesHandlingRedirect(sd, val, &newSd, &newUrl); /* redirect can modify the url */
+        if (netSkipHttpHeaderLinesHandlingRedirect(sd, val, &newSd, &newUrl)) /* redirect can modify the url */
+	    {
 	if (newUrl)
 	    {
     	    freeMem(newUrl);
 	    sd = newSd;
@@ -1691,8 +1692,9 @@
         close(sd);
         track->tdb->html = dyStringCannibalize(&ds);
         }
     }
+    }
 tdb->url = hashFindVal(hash, "url");
 if ((val = hashFindVal(hash, "visibility")) != NULL)
     {
     if (isdigit(val[0]))