HTTParty.head retrieves full response for MP3

611 views Asked by At

I'm using HTTParty to check the health of some mp3s, so I just want to make a head request and see the response code. However when I use HTTParty.head on mp3s I'm receiving the full response.

e.g., response = HTTParty.head("https://archive.org/download/is-los-angeles-still-a-city-of-quartz.LYaAW6.popuparchive.org/ww_2015-06-18-202413.6929.mp3")

Using curl works as expected curl -IL https://archive.org/download/is-los-angeles-still-a-city-of-quartz.LYaAW6.popuparchive.org/ww_2015-06-18-202413.6929.mp3

1

There are 1 answers

0
nesiseka On BEST ANSWER

Here's the issue you're looking for on GitHub. One of the answers work (seems to be a problem with redirects):

HTTParty.head("https://archive.org/download/is-los-angeles-still-a-city-of-quartz.LYaAW6.popuparchive.org/ww_2015-06-18-202413.6929.mp3", follow_redirects: true, maintain_method_across_redirects: true)