Add early return and tests for internal/handlers/https

The following discussion from !735 (merged) should be addressed:

  • @vshushlin started a discussion:

    I would add

    if !redirect {
    	return handler
    }
    
    and tests for this handler. But let's move it to the follow-up issue. This is already a nice improvement :thumbs-up: