reverse the code used for test https