fa56a49c43067fd2f3d0fbec1864bf26b1cda0d3
max
  Mon Dec 20 05:50:53 2021 -0800
taking back accidental commit of cart.c found in code review, refs #28637

diff --git src/hg/lib/cart.c src/hg/lib/cart.c
index 895c81e..c2d17d1 100644
--- src/hg/lib/cart.c
+++ src/hg/lib/cart.c
@@ -1327,33 +1327,31 @@
 
 if (cfgOptionBooleanDefault("suppressVeryEarlyErrors", FALSE))
     htmlSuppressErrors();
 setUdcCacheDir();
 
 struct cart *cart;
 struct sqlConnection *conn = cartDefaultConnector();
 char *ex;
 boolean userIdFound = FALSE, sessionIdFound = FALSE;
 
 AllocVar(cart);
 cart->hash = newHash(12);
 cart->exclude = newHash(7);
 cart->userId = userId;
 cart->sessionId = sessionId;
-//if ( cgiOptionalString(cart, "incognito", NULL) != NULL )
 cart->userInfo = loadDb(conn, userDbTable(), userId, &userIdFound);
-
 cart->sessionInfo = loadDb(conn, sessionDbTable(), sessionId, &sessionIdFound);
 if (sessionIdFound)
     cartParseOverHash(cart, cart->sessionInfo->contents);
 else if (userIdFound)
     cartParseOverHash(cart, cart->userInfo->contents);
 else
     {
     char *defaultCartContents = getDefaultCart(conn);
     cartParseOverHash(cart, defaultCartContents);
     }
 char when[1024];
 safef(when, sizeof(when), "open %s %s", userId, sessionId);
 cartTrace(cart, when, conn);
 
 loadCgiOverHash(cart, oldVars);
@@ -2291,32 +2289,31 @@
 char *httpsProxy = cfgOption("httpsProxy");
 if (httpsProxy)
     setenv("https_proxy", httpsProxy, TRUE);
 char *ftpProxy = cfgOption("ftpProxy");
 if (ftpProxy)
     setenv("ftp_proxy", ftpProxy, TRUE);
 char *noProxy = cfgOption("noProxy");
 if (noProxy)
     setenv("no_proxy", noProxy, TRUE);
 char *logProxy = cfgOption("logProxy");
 if (logProxy)
     setenv("log_proxy", logProxy, TRUE);
 
 // if ignoreCookie or incognito is on the URL, don't check for cookies
 char *hguid = NULL;
-//if ( cgiOptionalString("ignoreCookie") == NULL && cgiOptionalString("incognito") == NULL )
-if ( cgiOptionalString("ignoreCookie") == NULL )
+if ( cgiOptionalString("ignoreCookie") == NULL && cgiOptionalString("incognito") == NULL )
     hguid = getCookieId(cookieName);
 char *hgsid = getSessionId();
 struct cart *cart = cartNew(hguid, hgsid, exclude, oldVars);
 cartExclude(cart, sessionVar);
 return cart;
 }
 
 static void addHttpHeaders()
 /* CGIs can initialize the global variable httpHeaders to control their own HTTP
  * headers. This allows, for example, to prevent web browser caching of hgTracks
  * responses, but implicitly allow web browser caching everywhere else */
 {
 struct slPair *h;
 for (h = httpHeaders; h != NULL; h = h->next)
     {