[refactor] Clean up the HTTPS options parse logic