2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-26 19:40:12 +00:00

Change the html explorer to defer status code until end to allow for error code 500

to work
This commit is contained in:
Jarrod Johnson 2013-11-19 10:22:36 -05:00
parent 7752bbbc27
commit 74da3d64e8

View File

@ -235,13 +235,15 @@ def resourcehandler(env, start_response):
start_response('400 Bad Request', headers)
yield '400 - Bad Request'
return
start_response('200 OK', headers)
pagecontent = ""
if mimetype == 'text/html':
for datum in _assemble_html(hdlr, resource, querydict, url):
yield datum
pagecontent += datum
else:
for datum in _assemble_json(hdlr, resource, url):
yield datum
pagecontent += datum
start_response('200 OK', headers)
yield pagecontent
def _assemble_html(responses, resource, querydict, url):