Added a testcase that marks http-only URLs as  + some minor cleanup