From 2dfb099ebb1debfc33600d4bb6029e06f1b27143 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Sat, 5 Feb 2005 04:16:01 +0000 Subject: [PATCH] * Cleanup of new message range view-o-matic * GroupDAV GET operations now only send the Content-type: and Date: headers. All the others are irrelevant. --- webcit/ChangeLog | 6 +++++- webcit/calendar_view.c | 8 -------- webcit/event.c | 7 +++++-- webcit/groupdav_get.c | 18 ++++++++++++++---- webcit/groupdav_put.c | 9 +++++---- webcit/messages.c | 17 ++++++++++------- webcit/static/head.html | 23 ++++++++++++----------- webcit/webcit.c | 3 ++- 8 files changed, 53 insertions(+), 38 deletions(-) diff --git a/webcit/ChangeLog b/webcit/ChangeLog index 88d92fd43..4e85922e2 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,4 +1,9 @@ $Log$ +Revision 528.42 2005/02/05 04:16:01 ajc +* Cleanup of new message range view-o-matic +* GroupDAV GET operations now only send the Content-type: and Date: + headers. All the others are irrelevant. + Revision 528.41 2005/02/04 19:19:23 ajc * Message reading range selection is now a drop-down box. @@ -2312,4 +2317,3 @@ Sun Dec 6 19:50:55 EST 1998 Art Cancro 1998-12-03 Nathan Bryant * webserver.c: warning fix - diff --git a/webcit/calendar_view.c b/webcit/calendar_view.c index 834a4d3b5..5d074c80e 100644 --- a/webcit/calendar_view.c +++ b/webcit/calendar_view.c @@ -78,14 +78,6 @@ void calendar_month_view_display_events(time_t thetime) { localtime_r(&event_tt, &event_tm); } -lprintf(9, "Event: %04d-%s-%02d, Now: %04d-%s-%02d\n", - event_tm.tm_year + 1900, - ascmonths[event_tm.tm_mon], - event_tm.tm_mday, - today_tm.tm_year + 1900, - ascmonths[today_tm.tm_mon], - today_tm.tm_mday); - if ((event_tm.tm_year == today_tm.tm_year) && (event_tm.tm_mon == today_tm.tm_mon) && (event_tm.tm_mday == today_tm.tm_mday)) { diff --git a/webcit/event.c b/webcit/event.c index 0142ac912..9c4aabd21 100644 --- a/webcit/event.c +++ b/webcit/event.c @@ -666,14 +666,17 @@ STARTOVER: lprintf(9, "Remove unlisted attendees\n"); /* If the user clicked 'Save' then save it to the server. */ lprintf(9, "Serializing it for saving\n"); if ( (encaps != NULL) && (!strcasecmp(bstr("sc"), "Save")) ) { - serv_puts("ENT0 1|||4"); + serv_puts("ENT0 1|||4|||1|"); serv_gets(buf); - if (buf[0] == '4') { + if (buf[0] == '8') { serv_puts("Content-type: text/calendar"); serv_puts(""); serv_puts(icalcomponent_as_ical_string(encaps)); serv_puts("000"); } + while (serv_gets(buf), strcmp(buf, "000")) { + lprintf(9, "ENT0 REPLY: %s\n", buf); + } icalcomponent_free(encaps); } diff --git a/webcit/groupdav_get.c b/webcit/groupdav_get.c index 9e6edc514..66bcb1626 100644 --- a/webcit/groupdav_get.c +++ b/webcit/groupdav_get.c @@ -34,8 +34,9 @@ void groupdav_get(char *dav_pathname) { char dav_uid[SIZ]; long dav_msgnum = (-1); char buf[SIZ]; - int found_content_type = 0; int n = 0; + int in_body = 0; + int found_content_type = 0; /* First, break off the "/groupdav/" prefix */ remove_token(dav_pathname, 0, '/'); @@ -88,12 +89,21 @@ void groupdav_get(char *dav_pathname) { groupdav_common_headers(); wprintf("ETag: \"%ld\"\n", dav_msgnum); while (serv_gets(buf), strcmp(buf, "000")) { + if (!strncasecmp(buf, "Date: ", 6)) { + wprintf("%s\n", buf); + } if (!strncasecmp(buf, "Content-type: ", 14)) { + wprintf("%s\n", buf); found_content_type = 1; } - if ((strlen(buf) == 0) && (found_content_type == 0)) { - wprintf("Content-type: text/plain\n"); + if ((strlen(buf) == 0) && (in_body == 0)) { + if (!found_content_type) { + wprintf("Content-type: text/plain\n"); + } + in_body = 1; + } + if (in_body) { + wprintf("%s\n", buf); } - wprintf("%s\n", buf); } } diff --git a/webcit/groupdav_put.c b/webcit/groupdav_put.c index c83be3f61..3a92de820 100644 --- a/webcit/groupdav_put.c +++ b/webcit/groupdav_put.c @@ -134,11 +134,12 @@ void groupdav_put(char *dav_pathname, char *dav_ifmatch, strcpy(dav_uid, ""); while (serv_gets(buf), strcmp(buf, "000")) { switch(n++) { - case 0: - new_msgnum = atol(buf); + case 0: new_msgnum = atol(buf); + break; + case 1: lprintf(9, "new_msgnum=%ld (%s)\n", new_msgnum, buf); + break; + case 2: strcpy(dav_uid, buf); break; - case 2: - strcpy(dav_uid, buf); default: break; } diff --git a/webcit/messages.c b/webcit/messages.c index a9327eee5..718177f4e 100644 --- a/webcit/messages.c +++ b/webcit/messages.c @@ -1276,14 +1276,10 @@ void readloop(char *oper) * messages, then display the selector bar */ if (num_displayed > 1) { - if ((!is_tasks) && (!is_calendar) && (!is_addressbook) && (!is_notes) && (!is_singlecard)) { - wprintf("Reading #%d-%d of %d messages.", - lowest_displayed, highest_displayed, nummsgs); + if ((!is_tasks) && (!is_calendar) && (!is_addressbook) + && (!is_notes) && (!is_singlecard)) { - if (is_summary) { - wprintf("\n"); - } + wprintf("Reading #", lowest_displayed, highest_displayed); wprintf(" of %d messages.", nummsgs); + + if (is_summary) { + wprintf("\n"); + } + } } if (is_summary) wprintf("\n"); diff --git a/webcit/static/head.html b/webcit/static/head.html index 76ce95281..9e7a40b51 100644 --- a/webcit/static/head.html +++ b/webcit/static/head.html @@ -16,7 +16,6 @@ body { margin:0; - margin-right: 1px; padding: 0 0 0 0; height: 100%; overflow: auto; @@ -32,7 +31,7 @@ body { display:block; top:0px; left:0px; - width: 10%; + width: 15%; height:100%; background: #ffffff; } @@ -42,7 +41,7 @@ body { display:block; top:0px; left:0px; - width: 10%; + width: 15%; height:100%; background: #ffffff; } @@ -51,8 +50,8 @@ body { position:fixed; display:block; top:0px; - left: 10%; - width: 90%; + left: 15%; + width: 85%; height: 15%; background: #444455; } @@ -61,8 +60,8 @@ body { position:absolute; display:block; top:0px; - left: 10%; - width: 90%; + left: 15%; + width: 85%; height: 15%; background: #444455; } @@ -79,20 +78,22 @@ body { position:fixed; display:block; top: 15%; - left: 10%; - width: 90%; + left: 15%; + width: 85%; height: 85%; overflow: auto; + /* overflow-x: hidden; */ } * html #content { position:absolute; display:block; top: 15%; - left: 10%; - width: 90%; + left: 15%; + width: 85%; height: 85%; overflow: auto; + /* overflow-x: hidden; */ } #button { diff --git a/webcit/webcit.c b/webcit/webcit.c index 790c3e181..d61817e80 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -536,7 +536,8 @@ void output_static(char *what) fstat(fileno(fp), &statbuf); bytes = statbuf.st_size; - lprintf(3, "Static: %s, (%s; %ld bytes)\n", what, content_type, bytes); + /* lprintf(3, "Static: %s, (%s; %ld bytes)\n", + what, content_type, bytes); */ bigbuffer = malloc(bytes + 2); fread(bigbuffer, bytes, 1, fp); fclose(fp); -- 2.39.2