From 42f95af7568982b95b1a0189c7b0efcae3adc567 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 1 Jul 2009 15:49:08 +0000 Subject: [PATCH] Monotone-Parent: 52e582748151e87bfde51bfd7c475d994270767b Monotone-Revision: 6485cacb283ff7fd9905e8d9e8d097a761fc9c39 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-07-01T15:49:08 Monotone-Branch: ca.inverse.sogo --- SOPE/sope-patchset-r1657.diff | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/SOPE/sope-patchset-r1657.diff b/SOPE/sope-patchset-r1657.diff index be579afa4..b15d0e882 100644 --- a/SOPE/sope-patchset-r1657.diff +++ b/SOPE/sope-patchset-r1657.diff @@ -4024,6 +4024,22 @@ Index: sope-appserver/NGObjWeb/GNUmakefile.postamble - $(INSTALL_ROOT_DIR)/$(GNUSTEP_MAKEFILES)/wobundle.make -endif + $(DESTDIR)/$(GNUSTEP_MAKEFILES)/wobundle.make +Index: sope-appserver/NGObjWeb/ChangeLog +=================================================================== +--- sope-appserver/NGObjWeb/ChangeLog (revision 1660) ++++ sope-appserver/NGObjWeb/ChangeLog (working copy) +@@ -1,3 +1,11 @@ ++2009-07-01 Wolfgang Sourdeau ++ ++ * WOHttpAdaptor/WOHttpTransaction.m ++ (-deliverResponse:toRequest:onStream:): we test the content-length ++ and impose a content-type of text/plain when 0. This work-arounds ++ a bug in Mozilla clients where empty responses with a content-type ++ set to X/xml will trigger an exception. ++ + 2009-06-10 Helge Hess + + * DAVPropMap.plist: mapped {DAV:}current-user-principal (v4.9.37) Index: sope-appserver/NGObjWeb/WODirectAction.m =================================================================== --- sope-appserver/NGObjWeb/WODirectAction.m (revision 1660) @@ -4274,3 +4290,36 @@ Index: sope-appserver/NGObjWeb/SoObjects/SoObject.m } } +Index: sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m +=================================================================== +--- sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m (revision 1660) ++++ sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m (working copy) +@@ -696,7 +696,7 @@ + *(&out) = nil; + + [self _httpValidateResponse:_response]; +- ++ + out = [(NGCTextStream *)[NGCTextStream alloc] initWithSource:_out]; + + NS_DURING { +@@ -705,6 +705,7 @@ + id body; + BOOL doZip; + BOOL isok = YES; ++ int length; + + doZip = [_response shouldZipResponseToRequest:_request]; + +@@ -738,7 +739,10 @@ + + /* add content length header */ + +- snprintf((char *)buf, sizeof(buf), "%d", [body length]); ++ if ((length = [body length]) == 0) { ++ [_response setHeader:@"text/plain" forKey:@"content-type"]; ++ } ++ snprintf((char *)buf, sizeof(buf), "%d", length); + t1 = [[NSString alloc] initWithCString:(char *)buf]; + [_response setHeader:t1 forKey:@"content-length"]; + [t1 release]; t1 = nil;