|
|
@@ -134,8 +134,10 @@ module LiquidInterpolatable
|
134
|
134
|
|
135
|
135
|
# Get the destination URL of a given URL by recursively following
|
136
|
136
|
# redirects, up to 5 times in a row. If a given string is not a
|
137
|
|
- # valid absolute HTTP URL, or any error occurs while following
|
138
|
|
- # redirects, the original string is returned.
|
|
137
|
+ # valid absolute HTTP URL or in case of too many redirects, the
|
|
138
|
+ # original string is returned. If any network/protocol error
|
|
139
|
+ # occurs while following redirects, the last URL followed is
|
|
140
|
+ # returned.
|
139
|
141
|
def uri_expand(url, limit = 5)
|
140
|
142
|
uri = URI(url)
|
141
|
143
|
|