open uri patch for safe handling of redirects