From eb2817a20ec53665bb4d2d4eba8598766d17fc77 Mon Sep 17 00:00:00 2001 From: Christian Garbs Date: Sun, 28 Feb 2016 20:59:54 +0100 Subject: [PATCH] add 'lwp-request' to non-html user agents this should make /usr/bin/GET from libwww perl output plain text instead of HTML --- bin/srv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/srv.py b/bin/srv.py index 0867d9f..809b3a5 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 or 'httpie' in user_agent: + if 'curl' in user_agent or 'wget' in user_agent or 'httpie' in user_agent or 'lwp-request' in user_agent: html_output = False if location == ':help':