ed2944f615eb64c06c10b868754a60926a04a412 max Tue Sep 15 05:47:46 2026 -0700 Four leftovers from the Content-Type sweep, refs #38353 edwWebAuthLogin and edwWebAuthLogout still printed a blank line of their own after cgiPrintContentType(), which already ends the header block, so every response began with an empty line in the body. hgPhyloPlace built its own Content-Type line from a macro in five places. hgChooseDb's fail() sent a Status line and no Content-Type at all, so a bad request came back with a body apache had no type for. diff --git src/hg/hgChooseDb/hgChooseDb.c src/hg/hgChooseDb/hgChooseDb.c index 083461f7ae4..90d497d190d 100644 --- src/hg/hgChooseDb/hgChooseDb.c +++ src/hg/hgChooseDb/hgChooseDb.c @@ -191,31 +191,32 @@ void doMiddle(struct cart *theCart) /* Depending on invocation, either perform a query and print out results * or display the main page. */ { cart = theCart; if (cgiOptionalString(CARTJSON_COMMAND)) doCartJson(); else doMainPage(); } static void fail(char *msg) //#*** Copied from hgSuggest... libify to cheapCgi? { -puts("Status: 400\n\n"); +cgiAddHttpHeader("Status", "400 Bad Request"); +cgiPrintContentType("text/plain"); puts(msg); exit(-1); } INLINE void addIfStartsWithNoCase(char *term, char *target, struct dbDb *dbDb, struct hash *matchHash) { if (startsWithNoCase(term, target)) { if (! hashLookup(matchHash, target)) hashAdd(matchHash, target, dbDb); } } static void lookupTerm()