38eb8f2928026c01ab5b442fb964b6486dbf02ef angie Fri Jan 11 11:59:18 2019 -0800 Daniel found that the compress (.Z) and zip options were failing. Turns out hgSession was the only user of textOutCompressMenuContents. Follow suit with other CGIs and offer only gzip for compression. refs #22638 diff --git src/hg/hgSession/hgSession.c src/hg/hgSession/hgSession.c index 9fb0097..864a092 100644 --- src/hg/hgSession/hgSession.c +++ src/hg/hgSession/hgSession.c @@ -453,34 +453,30 @@ "\n"); printf("\n"); cgiMakeOnKeypressTextVar(hgsLoadUrlName, cartUsualString(cart, hgsLoadUrlName, ""), 20, jsPressOnEnter(hgsDoLoadUrl)); printf("  "); cgiMakeButton(hgsDoLoadUrl, "submit"); printf("\n"); printf("\n"); printf("

\n"); } void showSavingOptions(char *userName) /* Show options for saving a new named session in our db or to a file. */ { -static char *textOutCompressMenu[] = textOutCompressMenuContents; -static char *textOutCompressValues[] = textOutCompressValuesContents; -static int textOutCompressMenuSize = ArraySize(textOutCompressMenu) - 1; - printf("

Save Settings

\n"); printf("\n"); if (isNotEmpty(userName)) { printf("\n" "\n"); printf("\n"); } printf("\n"); printf("\n"); printf("\n"); printf("\n"); printf("
Save current settings as named session:" "
   name:\n"); cgiMakeOnKeypressTextVar(hgsNewSessionName, cartUsualString(cart, "db", NULL), 20, jsPressOnEnter(hgsDoNewSession)); printf("   "); cgiMakeCheckBox(hgsNewSessionShare, cartUsualBoolean(cart, hgsNewSessionShare, TRUE)); printf("allow this session to be loaded by others\n"); @@ -509,34 +505,37 @@ dyStringFree(&js); } else cgiMakeButton(hgsDoNewSession, "submit"); printf("
Save current settings to a local file:
   file:\n"); cgiMakeOnKeypressTextVar(hgsSaveLocalFileName, cartUsualString(cart, hgsSaveLocalFileName, ""), 20, jsPressOnEnter(hgsDoSaveLocal)); printf("   "); printf("file type returned: "); -cgiMakeDropListFull(hgsSaveLocalFileCompress, - textOutCompressMenu, textOutCompressValues, textOutCompressMenuSize, - cartUsualString(cart, hgsSaveLocalFileCompress, textOutCompressNone), - NULL, NULL); +char *compressType = cartUsualString(cart, hgsSaveLocalFileCompress, textOutCompressNone); +cgiMakeRadioButton(hgsSaveLocalFileCompress, textOutCompressNone, + differentWord(textOutCompressGzip, compressType)); +printf(" plain text  "); +cgiMakeRadioButton(hgsSaveLocalFileCompress, textOutCompressGzip, + sameWord(textOutCompressGzip, compressType)); +printf(" gzip compressed (ignored if output file is blank)"); printf(""); printf(" "); cgiMakeButton(hgsDoSaveLocal, "submit"); printf("
(leave file blank to get output in " "browser window)
\n"); } void showSessionControls(char *userName, boolean savedSessionsSupported, boolean webStarted) /* If userName is non-null, show sessions that belong to user and allow * saving of named sessions. * If savedSessionsSupported, allow import of named sessions.