Skip to content

Commit

Permalink
Set content-type and encode all strings to utf-8 in POST
Browse files Browse the repository at this point in the history
  • Loading branch information
n-i-x committed Feb 16, 2013
1 parent bb00698 commit 5a856e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mediaserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ def render_POST(self, request):

self.logger.debug('Sending response for %s to %s: %s', request.path,
request.getClientIP(), response)
return response
request.setHeader("Content-Type", "text/xml; charset=utf-8")
return response.encode('utf-8')

def GetContentDirectoryResponse(self, request):
self.logger.debug('Request content for %s from %s: %s', request.path,
Expand Down

0 comments on commit 5a856e8

Please sign in to comment.