added HTTPSServlet logic