-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add User-Agent for open call #20
Conversation
I mean, this repo is nothing to do with me - but your fix works so I've approved it. Would be good to have a spec for it ideally but I haven't looked at the rest of the coverage. I can't merge anyway, so its up to @damog |
I disagree that this is how the user agent should be overridden. Ideally, a set of headers is passed over to override the request, and not force all subsequent ones to Mozilla or whatever. Happy to look into it but happier to receive a patch that would do just that. |
@damog Don't know if it is overkill to make the accept-header customizable and how many feeds have this problem. But it is a strange behaviour considering
So |
@krisdigital: I tried debugging this for a bit today without much luck. Is there a simple way to see the full request headers from OpenURI? |
@damog it is mysterious.. Here is what I found out Open-Uri default headers
curl default headers
I used a little python script: https://gist.github.com/phrawzty/62540f146ee5e74ea1ab So in my case, the server I was trying to speak to seems to have a problem with the user agent |
@krisdigital -- interesting. I guess the user agent could be signed as Feedbag but I'd hate to break the simplicity of using the default open-uri behavior though. Regardless, if that server in particular doesn't like Ruby, well, I guess it's definitively up to the admin not to allow for automated access. |
@damog Understandable! I think we can close the ticket then.. Thank's for looking into it! |
Got 403 when trying to identify https://www.ultimate-guitar.com/modules/rss/all_updates.xml.php
Maybe solves #19?