Content-type: text/plain for errors or status messages

This commit is contained in:
James Taylor
2019-01-06 19:31:01 -08:00
parent 1c061783b4
commit 1ba38a5c9c
5 changed files with 12 additions and 12 deletions

View File

@@ -231,7 +231,7 @@ music_list_table_row = Template('''<tr>
def get_watch_page(env, start_response):
video_id = env['parameters']['v'][0]
if len(video_id) < 11:
start_response('404 Not Found', ())
start_response('404 Not Found', [('Content-type', 'text/plain'),])
return b'Incomplete video id (too short): ' + video_id.encode('ascii')
start_response('200 OK', [('Content-type','text/html'),])