mozilla-magnet / magnet-metadata-service

A service that returns metadata for given URLs
Other
8 stars 10 forks source link

Optimised content fetch by removing redundant requests (closes #37) #38

Closed wilsonpage closed 8 years ago

wilsonpage commented 8 years ago

@arcturus r?

arcturus commented 8 years ago

Still believe the HEAD request will be a cleaner way of getting the final url. Could you give it a try @wilsonpage ? Implementing our own mechanism is a bit scary.

wilsonpage commented 8 years ago

HEAD will require us to make several requests per URL, no?

  1. HEAD to check if the URL is a redirect
  2. GET to fetch content when we find it's not a redirect URL

But perhaps I'm not following.

On Wed, 18 May 2016 19:18 Francisco Jordano, notifications@github.com wrote:

Still believe the HEAD request will be a cleaner way of getting the final url. Could you give it a try @wilsonpage https://github.com/wilsonpage ? Implementing our own mechanism is a bit scary.

— You are receiving this because you were mentioned.

Reply to this email directly or view it on GitHub https://github.com/mozilla-magnet/magnet-metadata-service/pull/38#issuecomment-220113576

arcturus commented 8 years ago

It will require just two. And we will get ride of the checkings, not saying will be faster, but easy to maintain.

wilsonpage commented 8 years ago

I don't understand why that would be easier to maintain. We'd be doubling the number of requests for each URL found.

On Wed, 18 May 2016 19:39 Francisco Jordano, notifications@github.com wrote:

It will require just two. And we will get ride of the checkings, not saying will be faster, but easy to maintain.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/mozilla-magnet/magnet-metadata-service/pull/38#issuecomment-220119566

wilsonpage commented 8 years ago

@arcturus comments addressed

arcturus commented 8 years ago

r+ SHIIIIIP IT!

Just left a couple of nits, but looking really good. Also tried from the command line and working fine.

Nice work @wilsonpage