added test and https:// support