another attempt at fixing the user-agent#29
Open
pdelong42 wants to merge 3 commits intoswannodette:masterfrom
Open
another attempt at fixing the user-agent#29pdelong42 wants to merge 3 commits intoswannodette:masterfrom
pdelong42 wants to merge 3 commits intoswannodette:masterfrom
Conversation
added 3 commits
October 1, 2014 23:36
"Java/1.6.0_65"; but I get a 200 response when I use "clj-http.client/get", which has a User-Agent of "Apache-HttpClient/4.3.5 (java 1.5)". I'm not sure why this is the case, because HN doesn't seem to have a problem with me setting the User-Agent to either "Java" or "foo" as the value. Amendment: I did a quick search, and learned that sites have been specifically blocking User-Agents of the form "Java/xyz" for a while now, because this is typically the signature of bots that don't want to play nice and identify themselves. In light of this, I find it strange that Clojure doesn't set the user-agent to something else for its "slurp" function.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is another attempt to fix the issue in #23.
It took me a while to gather up the nerve to submit this, as I am also really new to Clojure, and have never submitted a pull request before.
I tried to keep the changes as minimal as possible, but I couldn't avoid pulling in an extra dependency.