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

This reverts commit dfa599e45b6da54439374d1983fc10d21d9ebf54.