Permalink
Browse files

add 'lwp-request' to non-html user agents

this should make /usr/bin/GET from libwww perl output plain text instead of HTML
  • Loading branch information...
1 parent 80b28db commit eb2817a20ec53665bb4d2d4eba8598766d17fc77 @mmitch mmitch committed Feb 28, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 bin/srv.py
View
@@ -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':

0 comments on commit eb2817a

Please sign in to comment.