#25 ✓resolved
rb2k

Normalize redirects

Reported by rb2k | May 18th, 2010 @ 07:46 AM | in 0.4.1

in the http.rb:

redirect_to = response.is_a?(Net::HTTPRedirection) ?  URI(response['location']): nil
should be
redirect_to = response.is_a?(Net::HTTPRedirection) ?  URI(response['location']).normalize : nil
(added .normalize)
Otherwise we run crash because we run into redirects like "http://www.example.org"
The current crawler doesn't allow root level redirects, sanitizing input would still would be the correct thing to do though:)

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Anemone is a Ruby library that makes it quick and painless to write programs that spider a website. It provides a simple DSL for performing actions on every page of a site, skipping certain URLs, and calculating the shortest path to a given page on a site.

Shared Ticket Bins

People watching this ticket

Tags

Pages