Changeset 10070 in genesis for tools/gformat.py
- Timestamp:
- Mar 9, 2012, 9:18:04 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/gformat.py
r10069 r10070 618 618 output = "" 619 619 if not uri[0]: 620 if os.environ['HTTP_USER_AGENT'].startswith('fetch '):620 if is_text_request(): 621 621 output += "Content-type:text/plain\r\n\r\n" 622 622 output += '\n'.join(get_hostlist()) … … 824 824 825 825 826 def is_text_request(): 827 return os.environ['HTTP_USER_AGENT'].split()[0] in ['curl', 'fetch', 'wget'] 826 828 827 829 def main(): … … 943 945 usage() 944 946 else: 945 cgitb.enable() 947 # Do not enable debugging for config requests as it highly clutters the output 948 if not is_text_request(): 949 cgitb.enable() 946 950 process_cgi_request() 947 951
Note:
See TracChangeset
for help on using the changeset viewer.