55735184a6c373f0802e54ca19fe0128ec912ba0
angie
  Wed Jan 7 12:33:49 2015 -0800
Adding cartEmptyShellNoContent so a CGI can postpone the Content-Type decision to doMiddle.
diff --git src/hg/inc/cart.h src/hg/inc/cart.h
index 205d276..bf77a5c 100644
--- src/hg/inc/cart.h
+++ src/hg/inc/cart.h
@@ -335,30 +335,37 @@
 
 void cartEarlyWarningHandler(char *format, va_list args);
 /* Write an error message so user can see it before page is really started */
 
 void cartWarnCatcher(void (*doMiddle)(struct cart *cart), struct cart *cart, WarnHandler warner);
 /* Wrap error and warning handlers around doMiddl. */
 
 void cartEmptyShell(void (*doMiddle)(struct cart *cart), char *cookieName,
 	char **exclude, struct hash *oldVars);
 /* Get cart and cookies and set up error handling, but don't start writing any
  * html yet. The doMiddleFunction has to call cartHtmlStart(title), and
  * cartHtmlEnd(), as well as writing the body of the HTML.
  * oldVars - those in cart that are overlayed by cgi-vars are
  * put in optional hash oldVars. */
 
+void cartEmptyShellNoContent(void (*doMiddle)(struct cart *cart), char *cookieName,
+                             char **exclude, struct hash *oldVars);
+/* Get cart and cookies and set up error handling.
+ * The doMiddle function must write the Content-Type header line.
+ * oldVars - those in cart that are overlayed by cgi-vars are
+ * put in optional hash oldVars. */
+
 void cartHtmlStart(char *title);
 /* Write HTML header and put in normal error handler. Needed with cartEmptyShell,
  * but not cartHtmlShell. */
 
 void cartFooter(void);
 /* Write out HTML footer, possibly with googleAnalytics too */
 
 void cartHtmlEnd();
 /* Write out HTML footer and get rid or error handler. Needed with cartEmptyShell,
  * but not cartHtmlShell. */
 
 void cartWebStart(struct cart *theCart, char *db, char *format, ...)
 /* Print out pretty wrapper around things when working
  * from cart. Balance this with cartWebEnd. */
 #if defined(__GNUC__)