community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1864312 - /comdev/reporter.apache.org/trunk/site/wizard/kibble.py
Date Sat, 03 Aug 2019 07:18:44 GMT
Author: humbedooh
Date: Sat Aug  3 07:18:44 2019
New Revision: 1864312

URL: http://svn.apache.org/viewvc?rev=1864312&view=rev
Log:
only output http headers if called as cgi

Modified:
    comdev/reporter.apache.org/trunk/site/wizard/kibble.py

Modified: comdev/reporter.apache.org/trunk/site/wizard/kibble.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/kibble.py?rev=1864312&r1=1864311&r2=1864312&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/kibble.py (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/kibble.py Sat Aug  3 07:18:44 2019
@@ -140,9 +140,10 @@ def main():
         with open(cache_file, 'w') as f:
             f.write(output)
             f.close()
-            
-    print("Status: 200 Okay")
-    print("Content-Type: application/json\r\n")
+    
+    if 'SCRIPT_NAME' in os.environ:
+        print("Status: 200 Okay")
+        print("Content-Type: application/json\r\n")
     print(output)
     
 if __name__ == '__main__':



Mime
View raw message