Added block based handler for http and https as well