Fix the rest server to work with newer cherrypy versions.
Merge pull request #5278 from geneguvo/restserver-with-new-cherrypy

Fix the rest server to work with newer cherrypy versions.