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
This commit is contained in:
Ludovic Marcotte
2008-10-22 15:54:02 +00:00
parent ddfba84ebe
commit 2ec29054e9
3 changed files with 17 additions and 17 deletions

View File

@@ -1180,7 +1180,7 @@ static Class sogoAppointmentFolderKlass = Nil;
toResponse: r];
// NSLog (@"/(appendPropstats...): %@", [NSDate date]);
[r appendContentString: @"</D:response>\r\n"];
[r appendContentString: @"</D:response>"];
}
- (void) appendMissingObjectRef: (NSString *) href
@@ -1188,7 +1188,7 @@ static Class sogoAppointmentFolderKlass = Nil;
{
[r appendContentString: @"<D:response><D:href>"];
[r appendContentString: href];
[r appendContentString: @"</D:href><D:status>HTTP/1.1 404 Not Found</D:status></D:response>\r\n"];
[r appendContentString: @"</D:href><D:status>HTTP/1.1 404 Not Found</D:status></D:response>"];
}
- (void) _appendTimeRange: (id <DOMElement>) 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:@"<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n"];
[r appendContentString:@"<?xml version=\"1.0\" encoding=\"utf-8\"?>"];
[r appendContentString: @"<D:multistatus xmlns:D=\"DAV:\""
@" xmlns:C=\"urn:ietf:params:xml:ns:caldav\">\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:@"</D:multistatus>\r\n"];
[r appendContentString:@"</D:multistatus>"];
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:@"<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n"];
[r appendContentString:@"<?xml version=\"1.0\" encoding=\"utf-8\"?>"];
[r appendContentString: @"<D:multistatus xmlns:D=\"DAV:\""
@" xmlns:C=\"urn:ietf:params:xml:ns:caldav\">\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:@"</D:multistatus>\r\n"];
[r appendContentString:@"</D:multistatus>"];
free (properties);
return r;
@@ -1913,7 +1913,7 @@ static Class sogoAppointmentFolderKlass = Nil;
{
[response setStatus: 200];
[response appendContentString:@"<?xml version=\"1.0\""
@" encoding=\"utf-8\"?>\r\n"];
@" encoding=\"utf-8\"?>"];
[response setHeader: @"application/xml; charset=utf-8"
forKey: @"Content-Type"];
[response appendContentString:

View File

@@ -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:@"<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n"];
[r appendContentString:@"<?xml version=\"1.0\" encoding=\"utf-8\"?>"];
[r appendContentString: @"<D:multistatus xmlns:D=\"DAV:\""
@" xmlns:C=\"urn:ietf:params:xml:ns:carddav\">\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:@"</D:multistatus>\r\n"];
[r appendContentString:@"</D:multistatus>"];
return r;
}

View File

@@ -263,7 +263,7 @@
[r appendContentString: @"</ownerdisplayname><D:displayname>"];
data = [currentFolder objectForKey: @"displayName"];
[r appendContentString: [data stringByEscapingXMLString]];
[r appendContentString: @"</D:displayname></D:response>\r\n"];
[r appendContentString: @"</D:displayname></D:response>"];
}
}
}
@@ -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:@"<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n"];
[r appendContentString:@"<?xml version=\"1.0\" encoding=\"utf-8\"?>"];
[r appendContentString: @"<D:multistatus xmlns:D=\"DAV:\""
@" xmlns=\"urn:ietf:params:xml:ns:inverse-dav\">\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:@"</D:multistatus>\r\n"];
[r appendContentString:@"</D:multistatus>"];
return r;
}
@@ -394,7 +394,7 @@
[r setStatus: 207];
if ([content length])
{
[r appendContentString: @"<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n"];
[r appendContentString: @"<?xml version=\"1.0\" encoding=\"utf-8\"?>"];
[r appendContentString: content];
}
}