X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=webcit%2Fcalendar.c;h=61d621993b99e8d9be63b12518f727adcd1d9398;hp=32a3e02f535b7644ab83e7b771abd615edbc6cac;hb=5685e790de93f77083ea240f474a4870b194c550;hpb=9c730b7051a96ed62fe0e0dd6c7eb650754988bd diff --git a/webcit/calendar.c b/webcit/calendar.c index 32a3e02f5..61d621993 100644 --- a/webcit/calendar.c +++ b/webcit/calendar.c @@ -1073,8 +1073,9 @@ void save_event(void) { void do_freebusy(char *req) { char who[SIZ]; char buf[SIZ]; - char *fb; + StrBuf *fb; int len; + long lines; extract_token(who, req, 1, ' ', sizeof who); if (!strncasecmp(who, "/freebusy/", 10)) { @@ -1094,17 +1095,17 @@ void do_freebusy(char *req) { serv_getln(buf, sizeof buf); if (buf[0] != '1') { - wprintf("HTTP/1.1 404 %s\n", &buf[4]); + hprintf("HTTP/1.1 404 %s\n", &buf[4]); output_headers(0, 0, 0, 0, 0, 0); - wprintf("Content-Type: text/plain\r\n"); - wprintf("\r\n"); + hprintf("Content-Type: text/plain\r\n"); wprintf("%s\n", &buf[4]); + end_burst(); return; } - fb = read_server_text(); - http_transmit_thing(fb, strlen(fb), "text/calendar", 0); - free(fb); + fb = read_server_text(&lines); + http_transmit_thing(fb, "text/calendar", 0); + FreeStrBuf(&fb); }