Project

General

Profile

Actions

Feature #11322

open

OpenUri: RuntimeError: HTTP redirection loop

Added by tbsprs (Tobias Preuss) almost 6 years ago. Updated 7 months ago.

Status:
Assigned
Priority:
Normal
Target version:
-
[ruby-core:69827]

Description

Trying to download this file from this website with OpenUri fails with the runtime error "HTTP redirection loop".
Here is how I can reproduce the error:

> require 'open-uri'
 => true

> open('http://apps.london.ca/OpenData/ShapeFiles_Zipped/2010_skateboard_parks_shp.zip')
RuntimeError: HTTP redirection loop: http://apps.london.ca/uniquesig87fdc01fb86ce6f0fd235c713015d7d7/uniquesig0/InternalSite/StartApp.asp?resource_id=837A134B9EC24A2197B6AF5745B6CA55&login_type=0&site_name=appstrunk&secure=0&orig_url=http%3a%2f%2fapps.london.ca%2fOpenData%2fShapeFiles_Zipped%2f2010_skateboard_parks_shp.zip
    from /home/john/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:232:in `open_loop'
    from /home/john/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:150:in `open_uri'
    from /home/john/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:716:in `open'
    from /home/john/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:34:in `open'
    from (irb):2
    from /home/john/.rvm/rubies/ruby-2.2.2/bin/irb:11:in `<main>'

Files

open_uri-redirect-cookie-11322.patch (2.3 KB) open_uri-redirect-cookie-11322.patch jeremyevans0 (Jeremy Evans), 08/23/2019 12:42 AM
Actions

Also available in: Atom PDF