From: Wilfried Göesgens Date: Sat, 18 Apr 2009 12:09:55 +0000 (+0000) Subject: * abort if we're not able to retrieve the citserver information instead of crashing... X-Git-Tag: v7.86~1249 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=fc768ba74cf0187109f075457867923d996a00c6;p=citadel.git * abort if we're not able to retrieve the citserver information instead of crashing over it. --- diff --git a/webcit/webcit.c b/webcit/webcit.c index 00afe8eb5..21dfdd391 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -837,6 +837,16 @@ void session_loop(HashList *HTTPHeaders, StrBuf *ReqLine, StrBuf *request_method } if (WCC->serv_info == NULL) WCC->serv_info = get_serv_info(browser_host, user_agent); + if (WCC->serv_info == NULL){ + begin_burst(); + wprintf(_("Received unexpected answer from Citadel " + "server; bailing out.")); + hprintf("HTTP/1.1 200 OK\r\n"); + hprintf("Content-type: text/plain; charset=utf-8\r\n"); + end_burst(); + end_webcit_session(); + goto SKIP_ALL_THIS_CRAP; + } if (WCC->serv_info->serv_rev_level < MINIMUM_CIT_VERSION) { begin_burst(); wprintf(_("You are connected to a Citadel "