Skip to content

Commit

Permalink
Merge pull request #16 from jamietanna/response_codes
Browse files Browse the repository at this point in the history
Return better HTTP error codes
  • Loading branch information
agiz committed Jun 15, 2016
2 parents 7aa85d4 + faba3fe commit ef4afd2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ytdl_server.py
Expand Up @@ -59,7 +59,7 @@ def do_GET(self):

data = self.match_id(yt_url)
if not data:
return self.send_response(204)
return self.send_response(400)

video_url = ''
if 'url' in data:
Expand All @@ -78,7 +78,7 @@ def do_GET(self):
if video_url_hi == '':
if video_url_lo == '':
print('Unknown format. Cannot play video from:', yt_url)
return self.send_response(204)
return self.send_response(400)
video_url = video_url_lo
else:
video_url = video_url_hi
Expand Down

0 comments on commit ef4afd2

Please sign in to comment.