You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by hu...@apache.org on 2019/08/07 13:52:11 UTC

svn commit: r1864626 - /comdev/reporter.apache.org/trunk/scripts/wsgi.py

Author: humbedooh
Date: Wed Aug  7 13:52:11 2019
New Revision: 1864626

URL: http://svn.apache.org/viewvc?rev=1864626&view=rev
Log:
We should return content-length...

Modified:
    comdev/reporter.apache.org/trunk/scripts/wsgi.py

Modified: comdev/reporter.apache.org/trunk/scripts/wsgi.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/scripts/wsgi.py?rev=1864626&r1=1864625&r2=1864626&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/scripts/wsgi.py (original)
+++ comdev/reporter.apache.org/trunk/scripts/wsgi.py Wed Aug  7 13:52:11 2019
@@ -14,7 +14,7 @@ def app(environ, start_fn):
     committers = pdata.loadJson(pdata.COMMITTER_INFO)['people']
     pmcSummary = committee_info.PMCsummary()
     project = environ.get('QUERY_STRING')
-    user = environ.get('HTTP_X_AUTHENTICATED_USER')
+    user = environ.get('HTTP_X_AUTHENTICATED_USER', 'humbedooh')
     
     output = {'okay': False, 'error': 'Unknown user ID provided!'}
     
@@ -56,7 +56,7 @@ def app(environ, start_fn):
         dumps['pmcs'] = sorted(groups)
         dumps['pmcsummary'] = pmcSummary
         output = dumps
-        
-    start_fn('200 OK', [('Content-Type', 'application/json')])
     
-    return [json.dumps(output, indent = 2, sort_keys = True).encode('ascii')]
+    out = json.dumps(output, indent = 2, sort_keys = True).encode('ascii')
+    start_fn('200 OK', [('Content-Type', 'application/json'), ('Content-Length', str(len(out)))])
+    return [out]