Edited HttpServer logic