Skip to content

Commit

Permalink
Use headers.get() to get Content-Type; improves Python3 compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
jelmer committed Apr 13, 2016
1 parent 3a1025e commit f8856c0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions dulwich/tests/compat/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,10 +436,7 @@ def run_backend(self):
if len(authorization) == 2:
env['REMOTE_USER'] = authorization[0]
# XXX REMOTE_IDENT
if self.headers.typeheader is None:
env['CONTENT_TYPE'] = self.headers.type
else:
env['CONTENT_TYPE'] = self.headers.typeheader
env['CONTENT_TYPE'] = self.headers.get('content-type')
length = self.headers.get('content-length')
if length:
env['CONTENT_LENGTH'] = length
Expand Down

0 comments on commit f8856c0

Please sign in to comment.