From 2d26e54127e8b637f127cec457c077619cb13534 Mon Sep 17 00:00:00 2001 From: Philipp Klose Date: Thu, 18 Feb 2016 14:18:27 +0100 Subject: [PATCH] Do not render HTML when fetching data with HTTPie [HTTPie](https://github.com/jkbrzt/httpie) is another popular command line HTTP client. This commit / PR make sure HTTPie does not get the HTML output, but instead the console version. --- bin/srv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/srv.py b/bin/srv.py index 357753f..d9c5d3d 100644 --- a/bin/srv.py +++ b/bin/srv.py @@ -225,7 +225,7 @@ def wttr(location = None): user_agent = request.headers.get('User-Agent').lower() html_output = True - if 'curl' in user_agent or 'wget' in user_agent: + if 'curl' in user_agent or 'wget' in user_agent or 'HTTPie' in user_agent: html_output = False if location == ':help':