Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 569

Show
Ignore:
Timestamp:
08/28/05 14:49:41
Author:
lawouach
Message:

Fixed bug 265 and added xmlRpcFilter.encoding parameter to be able to specify the encoding used by the xmlrpclib module (see http://docs.python.org/lib/node552.html)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/lib/filter/xmlrpcfilter.py

    r497 r569  
    3030## 
    3131## History: 
     32## 1.0.4   : 2005-08-28 Fixed issues on input types which are not strings 
    3233## 1.0.3   : 2005-01-28 Bugfix on content-length in 1.0.2 code fixed by 
    3334##           Gian Paolo Ciceri 
     
    185186            or not cherrypy.request.isRPC): 
    186187            return 
     188 
     189        encoding = cherrypy.config.get('xmlRpcFilter.encoding', 'utf-8') 
     190 
     191        if not isinstance(cherrypy.response.body, list): 
     192            cherrypy.response.body = [cherrypy.response.body] 
    187193         
    188194        cherrypy.response.body = [xmlrpclib.dumps( 
    189             (cherrypy.response.body[0],), methodresponse=1, allow_none=1)] 
     195            (cherrypy.response.body[0],), 
     196            methodresponse=1, 
     197            encoding=encoding, 
     198            allow_none=1)] 
    190199        cherrypy.response.headerMap['Content-Type'] = 'text/xml' 
    191200        cherrypy.response.headerMap['Content-Length'] = `len(cherrypy.response.body[0])` 

Hosted by WebFaction

Log in as guest/cpguest to create tickets