3503f8667486a2b5ff657fd2a73de829dbae0138
galt
  Tue May 30 10:21:08 2017 -0700
Un-doing change that was not needed. netSkipHttpHeaderLinesHandlingRedirect has already closed the file descriptor itself on failure. No need for us to close it.

diff --git src/lib/net.c src/lib/net.c
index 473a0c1..b8ddb22 100644
--- src/lib/net.c
+++ src/lib/net.c
@@ -1672,31 +1672,30 @@
 int sd = netUrlOpen(url);
 if (sd < 0)
     {
     warn("Couldn't open %s", url);
     return NULL;
     }
 else
     {
     struct lineFile *lf = NULL;
     char *newUrl = NULL;
     int newSd = 0;
     if (startsWith("http://",url) || startsWith("https://",url))
 	{  
 	if (!netSkipHttpHeaderLinesHandlingRedirect(sd, url, &newSd, &newUrl))
 	    {
-	    close(sd);
 	    return NULL;
 	    }
 	if (newUrl != NULL)
 	    {
     	    /*  Update sd with newSd, replace it with newUrl, etc. */
 	    sd = newSd;
 	    url = newUrl;
 	    }
 	}
     char *urlDecoded = cloneString(url);
     cgiDecode(url, urlDecoded, strlen(url));
     boolean isCompressed =
 	(endsWith(urlDecoded,".gz") ||
    	 endsWith(urlDecoded,".Z")  ||
 	 endsWith(urlDecoded,".bz2"));