Bug 1020685: Close only over the URL string that we need. r=bfrancis