migrated from BaseHTTPServer to CherryPy