WeTransfer / format_parser

file metadata parsing, done cheap
https://rubygems.org/gems/format_parser
Other
62 stars 18 forks source link

Change FormatParser.parse_http to follow a redirect #190

Closed fabioperrella closed 3 years ago

fabioperrella commented 3 years ago

closes https://github.com/WeTransfer/format_parser/issues/189

This PR adds support to follow a redirect when downloading a file with FormatParser.parse_http

I was inspired by this article which explains how to follow a redirect using Faraday

fabioperrella commented 3 years ago

Could we set a limit to the number of redirects to follow?

@lorenzograndi4 I saw here that the default value is 3.

It seems a reasonable value for me.

Do you think we should use another value?

lorenzograndi4 commented 3 years ago

3 sounds good !