Author: rfm Date: Tue Nov 29 18:23:53 2016 New Revision: 40245 URL: http://svn.gna.org/viewcvs/gnustep?rev=40245&view=rev Log: Fix bug producing static pages ... should use utf-8
Modified: libs/webserver/trunk/WebServer.h libs/webserver/trunk/WebServer.m libs/webserver/trunk/WebServerHeader.m Modified: libs/webserver/trunk/WebServer.h URL: http://svn.gna.org/viewcvs/gnustep/libs/webserver/trunk/WebServer.h?rev=40245&r1=40244&r2=40245&view=diff ============================================================================== --- libs/webserver/trunk/WebServer.h (original) +++ libs/webserver/trunk/WebServer.h Tue Nov 29 18:23:53 2016 @@ -730,6 +730,7 @@ * Loads a template file from disk and places it in aResponse as content * whose mime type is determined from the file extension using the * provided mapping (or a simple built-in default mapping if map is nil).<br /> + * Text responses use utf-8 enmcoding.<br /> * If you have a dedicated web server for handling static pages (eg images) * it is better to use that rather than vending static pages using this * method. It's unlikely that this method can be as efficient as a dedicated Modified: libs/webserver/trunk/WebServer.m URL: http://svn.gna.org/viewcvs/gnustep/libs/webserver/trunk/WebServer.m?rev=40245&r1=40244&r2=40245&view=diff ============================================================================== --- libs/webserver/trunk/WebServer.m (original) +++ libs/webserver/trunk/WebServer.m Tue Nov 29 18:23:53 2016 @@ -1166,6 +1166,11 @@ else { [aResponse setContent: data type: type name: nil]; + if (YES == string) + { + [[aResponse headerNamed: @"content-type"] setParameter: @"utf-8" + forKey: @"charset"]; + } } DESTROY(arp); return result; Modified: libs/webserver/trunk/WebServerHeader.m URL: http://svn.gna.org/viewcvs/gnustep/libs/webserver/trunk/WebServerHeader.m?rev=40245&r1=40244&r2=40245&view=diff ============================================================================== --- libs/webserver/trunk/WebServerHeader.m (original) +++ libs/webserver/trunk/WebServerHeader.m Tue Nov 29 18:23:53 2016 @@ -79,7 +79,7 @@ return self; } -- (NSString*)name +- (NSString*) name { switch (wshType) { _______________________________________________ Gnustep-cvs mailing list Gnustep-cvs@gna.org https://mail.gna.org/listinfo/gnustep-cvs