Issue #499 resolved

Request validation in XmlRpcFilter

Anonymous created an issue

In, there's such code to validate a XML-RPC request: {{{ def testValidityOfRequest(self): # test if the content-length was sent length = cherrypy.request.headers.get('Content-Length') or 0 ct = cherrypy.request.headers.get('Content-Type') or 'text/xml' return int(length) > 0 and ct.lower() in ['text/xml'] }}} The content type of a valid request might be different than 'text/xml'. for example, it can be 'text/xml;charset=UTF-8'. In such situation, the last statement: {{{ ct.lower() in ['text/xml'] }}} will cause problem.

Reported by

Comments (2)

  1. Log in to comment