Skip to content
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

Allow user to specify User-Agent #3421

Merged
merged 1 commit into from
Feb 5, 2017

Conversation

thenaesh
Copy link
Contributor

@thenaesh thenaesh commented Feb 5, 2017

Fixes #3384

When requesting a document from a URL, a user can now specify the User-Agent by doing something like:

USER_AGENT="Mozilla/5.0" pandoc -f html -t markdown http://www.fsf.org

This should fix the problem of Pandoc appearing as an "unsupported browser" to some websites. :)

This commit enables users to specify the User-Agent
header used when pandoc requests a document from
a URL. This is done by setting an environment variable.
For instance, one can do:
USER_AGENT="..." ./pandoc -f html -t markdown http://example.com

Signed-off-by: Thenaesh Elango <thenaeshelango@gmail.com>
@jgm jgm merged commit 9421890 into jgm:master Feb 5, 2017
@jgm
Copy link
Owner

jgm commented Feb 5, 2017

Thanks. I don't understand the build failure with one ghc version on travis, but we'll figure that out next.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User Agent argument switch if downloading content/images
2 participants