From: helge Date: Sat, 12 Mar 2005 20:43:50 +0000 (+0000) Subject: improved HTTP version headers X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18821d8dce2aff6011c6ee11bb2ca3c52603df7b;p=sope improved HTTP version headers properly specify charset in MIME headers git-svn-id: http://svn.opengroupware.org/SOPE/trunk@648 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-appserver/NGObjWeb/ChangeLog b/sope-appserver/NGObjWeb/ChangeLog index 34404b06..49eb9139 100644 --- a/sope-appserver/NGObjWeb/ChangeLog +++ b/sope-appserver/NGObjWeb/ChangeLog @@ -1,3 +1,14 @@ +2005-03-12 Helge Hess + + * v4.5.135 + + * WOHTTPConnection.m: deliver proper SOPE version in 'user-agent' + + * SoWebDAVRenderer.m: deliver proper SOPE version in 'server' header + + * WOStats.m, SoWebDAVRenderer.m: explicitly specify charset of text/xml + result + 2005-03-11 Helge Hess * WebDAV/SoWebDAVRenderer.m: fixed ordering of propstat result elements diff --git a/sope-appserver/NGObjWeb/Version b/sope-appserver/NGObjWeb/Version index ab606870..442dc460 100644 --- a/sope-appserver/NGObjWeb/Version +++ b/sope-appserver/NGObjWeb/Version @@ -1,6 +1,6 @@ # version file -SUBMINOR_VERSION:=134 +SUBMINOR_VERSION:=135 # v4.5.122 requires libNGExtensions v4.5.153 # v4.5.91 requires libNGExtensions v4.5.134 diff --git a/sope-appserver/NGObjWeb/WOHTTPConnection.m b/sope-appserver/NGObjWeb/WOHTTPConnection.m index 2ab95a68..8cdc3da0 100644 --- a/sope-appserver/NGObjWeb/WOHTTPConnection.m +++ b/sope-appserver/NGObjWeb/WOHTTPConnection.m @@ -460,7 +460,15 @@ static BOOL logStream = NO; [self debugWithFormat:@" wrote accept header ..."]; } if ([_request headerForKey:@"user-agent"] == nil) { - if (isok) isok = [self->io writeString:@"User-Agent: SOPE/4.2\r\n"]; + if (isok) { + static NSString *s = nil; + if (s == nil) { + s = [[NSString alloc] initWithFormat:@"User-Agent: SOPE/%i.%i.%i\r\n", + SOPE_MAJOR_VERSION, SOPE_MINOR_VERSION, + SOPE_SUBMINOR_VERSION]; + } + isok = [self->io writeString:s]; + } [self debugWithFormat:@" wrote user-agent header ..."]; } diff --git a/sope-appserver/NGObjWeb/WOStats.m b/sope-appserver/NGObjWeb/WOStats.m index e13b3105..5c95c358 100644 --- a/sope-appserver/NGObjWeb/WOStats.m +++ b/sope-appserver/NGObjWeb/WOStats.m @@ -149,18 +149,18 @@ xslPath = nil; response = [WOResponse responseWithRequest:[self request]]; - [response setHeader:@"text/xml" forKey:@"content-type"]; + [response setContentEncoding:NSUTF8StringEncoding]; + [response setHeader:@"text/xml; charset=utf-8" forKey:@"content-type"]; stats = [[app statisticsStore] statistics]; [response appendContentString:@"\n"]; -#if 1 if ([xslPath length] > 0) { [response appendContentString:@""]; } -#endif + [response appendContentString:@"\n"]; [r appendContentString:@"\n"]; [r appendContentString:@"\n"]; [r appendContentString:@"