ruby-on-railsherokutyphoeus

Why does Typhoeus with a url containing "#" returns 404 in Heroku and not in localhost?


I'm testing these 2 valid urls

http://www.businessinsider.com.au/smartphone-impact-brain-body-sleep-2015-2

http://www.businessinsider.com.au/smartphone-impact-brain-body-sleep-2015-2#ooid=BvMjVqcjoHdZBG6tTpXy8UkhB5_46U_c

Running the code below for both, the first one returns 200 OK, but the second one returns 404 only in the heroku. Even escaping the url with URI.escape(url):

request = Typhoeus::Request.new(url, followlocation: true)
request.on_headers do |response|
   puts response.code
end
request.run

Cannot have idea of this behavior. Maybe is some escaping problem with #?

If I make a little replace of the # to ?, it works

http://www.businessinsider.com.au/smartphone-impact-brain-body-sleep-2015-2?ooid=BvMjVqcjoHdZBG6tTpXy8UkhB5_46U_c

Thanks


Solution

  • The solution was updating libcurl in heroku updating to cedar-14 as pointed from https://github.com/typhoeus/ethon/issues/93