From 2ec29054e92b42b2384fdcd7abb41d66d56337a2 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Wed, 22 Oct 2008 15:54:02 +0000 Subject: [PATCH] Removed useless \r\n in DAV response. This confused Lightning 0.9. Monotone-Parent: f14f194e02808a128112c1844ba759925e48c6e7 Monotone-Revision: 24fe8bbb9b61c347ef798b9f6e888d08bf6aa660 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2008-10-22T15:54:02 Monotone-Branch: ca.inverse.sogo --- SoObjects/Appointments/SOGoAppointmentFolder.m | 18 +++++++++--------- SoObjects/Contacts/SOGoFolder+CardDAV.m | 6 +++--- SoObjects/SOGo/SOGoUserFolder.m | 10 +++++----- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index 35543a631..0e219c764 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -1180,7 +1180,7 @@ static Class sogoAppointmentFolderKlass = Nil; toResponse: r]; // NSLog (@"/(appendPropstats...): %@", [NSDate date]); - [r appendContentString: @"\r\n"]; + [r appendContentString: @""]; } - (void) appendMissingObjectRef: (NSString *) href @@ -1188,7 +1188,7 @@ static Class sogoAppointmentFolderKlass = Nil; { [r appendContentString: @""]; [r appendContentString: href]; - [r appendContentString: @"HTTP/1.1 404 Not Found\r\n"]; + [r appendContentString: @"HTTP/1.1 404 Not Found"]; } - (void) _appendTimeRange: (id ) timeRangeElement @@ -1488,9 +1488,9 @@ static Class sogoAppointmentFolderKlass = Nil; [r setHeader: @"text/xml; charset=\"utf-8\"" forKey: @"content-type"]; [r setHeader: @"no-cache" forKey: @"pragma"]; [r setHeader: @"no-cache" forKey: @"cache-control"]; - [r appendContentString:@"\r\n"]; + [r appendContentString:@""]; [r appendContentString: @"\r\n"]; + @" xmlns:C=\"urn:ietf:params:xml:ns:caldav\">"]; document = [[context request] contentAsDOMDocument]; documentElement = [document documentElement]; @@ -1499,7 +1499,7 @@ static Class sogoAppointmentFolderKlass = Nil; [self _appendComponentProperties: properties matchingFilters: [self _parseCalendarFilters: documentElement] toResponse: r]; - [r appendContentString:@"\r\n"]; + [r appendContentString:@""]; free (properties); return r; @@ -1680,9 +1680,9 @@ static Class sogoAppointmentFolderKlass = Nil; [r setHeader: @"text/xml; charset=\"utf-8\"" forKey: @"content-type"]; [r setHeader: @"no-cache" forKey: @"pragma"]; [r setHeader: @"no-cache" forKey: @"cache-control"]; - [r appendContentString:@"\r\n"]; + [r appendContentString:@""]; [r appendContentString: @"\r\n"]; + @" xmlns:C=\"urn:ietf:params:xml:ns:caldav\">"]; document = [[context request] contentAsDOMDocument]; documentElement = [document documentElement]; @@ -1691,7 +1691,7 @@ static Class sogoAppointmentFolderKlass = Nil; [self _appendComponentProperties: properties matchingURLs: [documentElement getElementsByTagName: @"href"] toResponse: r]; - [r appendContentString:@"\r\n"]; + [r appendContentString:@""]; free (properties); return r; @@ -1913,7 +1913,7 @@ static Class sogoAppointmentFolderKlass = Nil; { [response setStatus: 200]; [response appendContentString:@"\r\n"]; + @" encoding=\"utf-8\"?>"]; [response setHeader: @"application/xml; charset=utf-8" forKey: @"Content-Type"]; [response appendContentString: diff --git a/SoObjects/Contacts/SOGoFolder+CardDAV.m b/SoObjects/Contacts/SOGoFolder+CardDAV.m index 635e7f014..b40319039 100644 --- a/SoObjects/Contacts/SOGoFolder+CardDAV.m +++ b/SoObjects/Contacts/SOGoFolder+CardDAV.m @@ -137,9 +137,9 @@ [r setHeader: @"text/xml; charset=\"utf-8\"" forKey: @"content-type"]; [r setHeader: @"no-cache" forKey: @"pragma"]; [r setHeader: @"no-cache" forKey: @"cache-control"]; - [r appendContentString:@"\r\n"]; + [r appendContentString:@""]; [r appendContentString: @"\r\n"]; + @" xmlns:C=\"urn:ietf:params:xml:ns:carddav\">"]; document = [[queryContext request] contentAsDOMDocument]; filters = [self _parseContactFilters: [document documentElement]]; @@ -147,7 +147,7 @@ [self _appendComponentsMatchingFilters: filters toResponse: r context: queryContext]; - [r appendContentString:@"\r\n"]; + [r appendContentString:@""]; return r; } diff --git a/SoObjects/SOGo/SOGoUserFolder.m b/SoObjects/SOGo/SOGoUserFolder.m index 9049c9631..3026658d4 100644 --- a/SoObjects/SOGo/SOGoUserFolder.m +++ b/SoObjects/SOGo/SOGoUserFolder.m @@ -263,7 +263,7 @@ [r appendContentString: @""]; data = [currentFolder objectForKey: @"displayName"]; [r appendContentString: [data stringByEscapingXMLString]]; - [r appendContentString: @"\r\n"]; + [r appendContentString: @""]; } } } @@ -297,15 +297,15 @@ [r setHeader: @"text/xml; charset=\"utf-8\"" forKey: @"content-type"]; [r setHeader: @"no-cache" forKey: @"pragma"]; [r setHeader: @"no-cache" forKey: @"cache-control"]; - [r appendContentString:@"\r\n"]; + [r appendContentString:@""]; [r appendContentString: @"\r\n"]; + @" xmlns=\"urn:ietf:params:xml:ns:inverse-dav\">"]; document = [[context request] contentAsDOMDocument]; filter = [self _parseCollectionFilters: document]; [self _appendCollectionsMatchingFilter: filter toResponse: r]; - [r appendContentString:@"\r\n"]; + [r appendContentString:@""]; return r; } @@ -394,7 +394,7 @@ [r setStatus: 207]; if ([content length]) { - [r appendContentString: @"\r\n"]; + [r appendContentString: @""]; [r appendContentString: content]; } }