$Log$
+Revision 610.8 2005/05/26 04:28:27 ajc
+* Applied GroupDAV patches sent in by Johannes Schneider which improve the
+ protocol accuracy of xmlns and etag responses.
+* Fixed a MIME Content-Type bug which I had inadvertently introduced while
+ removing a temporary hack that was put in during KDE 3.4 beta
+
Revision 610.7 2005/05/24 04:26:47 ajc
* Applied a patch sent by Johannes Schneider for correcting the XML
namespace presented in the PROPFIND command.
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
-
begin_burst();
wprintf("<?xml version=\"1.0\" encoding=\"utf-8\"?>"
- "<D:multistatus xmlns:D=\"DAV:\"xmlns:G=\"http://groupdav.org/\">"
+ "<D:multistatus xmlns:D=\"DAV:\" xmlns:G=\"http://groupdav.org/\">"
);
serv_puts("LKRA");
begin_burst();
wprintf("<?xml version=\"1.0\" encoding=\"utf-8\"?>"
- "<D:multistatus xmlns:D=\"DAV:\"xmlns:G=\"http://groupdav.org/\">"
+ "<D:multistatus xmlns:D=\"DAV:\" xmlns:G=\"http://groupdav.org/\">"
);
//"<D:multistatus xmlns:D=\"DAV:\">"
* The pathname is always going to be /groupdav/room_name/euid
*/
void groupdav_put(char *dav_pathname, char *dav_ifmatch,
- char *supplied_content_type, char *dav_content
+ char *dav_content_type, char *dav_content
) {
char dav_roomname[SIZ];
char dav_uid[SIZ];
- char dav_content_type[SIZ];
long new_msgnum = (-2L);
long old_msgnum = (-1L);
char buf[SIZ];
return;
}
- /**********************
- * Ugly hack to mess with the content type. KOrganizer is either
- * not supplying one, or supplying the wrong one.
- * (Commented out because Reinhold has fixed this bug in KOrg.)
- strcpy(dav_content_type, supplied_content_type);
- lprintf(9, "Supplied content type: %s\n", dav_content_type);
- switch (WC->wc_view) {
- case VIEW_ADDRESSBOOK:
- strcpy(dav_content_type, "text/x-vcard");
- break;
- case VIEW_CALENDAR:
- strcpy(dav_content_type, "text/calendar");
- break;
- case VIEW_TASKS:
- strcpy(dav_content_type, "text/calendar");
- break;
- default:
- break;
- }
- lprintf(9, " Forced content type: %s\n", dav_content_type);
- ******************/
-
/*
* If an HTTP If-Match: header is present, the client is attempting
* to replace an existing item. We have to check to see if the
wprintf("HTTP/1.1 201 Created\r\n");
lprintf(9, "HTTP/1.1 201 Created\r\n");
groupdav_common_headers();
+ wprintf("ETag: \"%ld\"\r\n", new_msgnum);
wprintf("Content-Length: 0\r\n");
wprintf("Location: ");
if (strlen(WC->http_host) > 0) {
wprintf("HTTP/1.1 204 No Content\r\n");
lprintf(9, "HTTP/1.1 204 No Content\r\n");
groupdav_common_headers();
+ wprintf("ETag: \"%ld\"\r\n", new_msgnum);
wprintf("Content-Length: 0\r\n\r\n");
/* The item we replaced has probably already been deleted by