implemented test mode in HTTP server