From 847bc30edca12d28af39f4b78a32f84fae28f6b7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Tue, 10 Feb 2009 22:15:29 +0000 Subject: [PATCH] * output_headers musn't lean on having a server connection... --- webcit/webcit.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/webcit/webcit.c b/webcit/webcit.c index edc19a0c6..6715fe483 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -116,12 +116,17 @@ void output_headers( int do_httpheaders, /* 1 = output HTTP headers http_datestring(httpnow, sizeof httpnow, time(NULL)); if (do_httpheaders) { - hprintf("Content-type: text/html; charset=utf-8\r\n" - "Server: %s / %s\n" - "Connection: close\r\n", - PACKAGE_STRING, - ChrPtr(WCC->serv_info->serv_software) - ); + if (WCC->serv_info != NULL) + hprintf("Content-type: text/html; charset=utf-8\r\n" + "Server: %s / %s\n" + "Connection: close\r\n", + PACKAGE_STRING, + ChrPtr(WCC->serv_info->serv_software)); + else + hprintf("Content-type: text/html; charset=utf-8\r\n" + "Server: %s / [n/a]\n" + "Connection: close\r\n", + PACKAGE_STRING); } if (cache) { -- 2.39.2