mozilla-magnet / magnet-metadata-service

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

Include a User Agent header when making requests #43

Closed samgiles closed 8 years ago

samgiles commented 8 years ago

Sched 500s without a User Agent now :(.

r? @arcturus

wilsonpage commented 8 years ago
arcturus commented 8 years ago

It will hit if the url is directly the sched one.

I think is a good idea to use a UA, ideally the metadata server should receive it as parameter, but so far, being magnet the only client, I would use a chrome UA.

arcturus commented 8 years ago

+1 to use the UA in the configuration.

wilsonpage commented 8 years ago

It will hit if the url is directly the sched one.

@arcturus I don't follow. If we detect sched venue URLs they get adapted, no*?

* with Spanish accent

samgiles commented 8 years ago

Updated to use config user agent - I missed that.

arcturus commented 8 years ago

@arcturus I don't follow. If we detect sched venue URLs they get adapted, no*?

Yes and no, right now we are hard coding on the clients that adaptor. But if you try to use the metadata server without the client you will get the 500 error, which is bad :), and definitely can happen with other web pages. Right * ?

samgiles commented 8 years ago

Either way, we need to make requests with a User-Agent header. It just super annoying that Sched 500s if you don't set a valid UA header.

arcturus commented 8 years ago

oh yes, r+!