$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.
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
-
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)) {
/* 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);
}
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, '/');
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);
}
}
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;
}
* 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("<INPUT TYPE=\"submit\" NAME=\"sc\" "
- "VALUE=\"Delete selected\">\n");
- }
+ wprintf("Reading #", lowest_displayed, highest_displayed);
wprintf("<SELECT NAME=\"whichones\" SIZE=\"1\" "
"OnChange=\"location.href=msgomatic.whichones.options"
oper,
WC->msgarr[0]);
+ wprintf("</SELECT> of %d messages.", nummsgs);
+
+ if (is_summary) {
+ wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" "
+ "VALUE=\"Delete selected\">\n");
+ }
+
}
}
if (is_summary) wprintf("</FORM>\n");
body {
margin:0;
- margin-right: 1px;
padding: 0 0 0 0;
height: 100%;
overflow: auto;
display:block;
top:0px;
left:0px;
- width: 10%;
+ width: 15%;
height:100%;
background: #ffffff;
}
display:block;
top:0px;
left:0px;
- width: 10%;
+ width: 15%;
height:100%;
background: #ffffff;
}
position:fixed;
display:block;
top:0px;
- left: 10%;
- width: 90%;
+ left: 15%;
+ width: 85%;
height: 15%;
background: #444455;
}
position:absolute;
display:block;
top:0px;
- left: 10%;
- width: 90%;
+ left: 15%;
+ width: 85%;
height: 15%;
background: #444455;
}
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 {
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);