Skip to content

Commit

Permalink
content-type: do slightly more correct header parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
jelmer committed Jul 5, 2023
1 parent a1c3b3f commit 75b0369
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dulwich/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2007,7 +2007,7 @@ def _smart_request(self, service, url, data):
if isinstance(data, bytes):
headers["Content-Length"] = str(len(data))
resp, read = self._http_request(url, headers, data)
if not resp.content_type.startswith(result_content_type):
if resp.content_type.split(';')[0] != result_content_type:
raise GitProtocolError(
"Invalid content-type from server: %s" % resp.content_type
)
Expand Down

0 comments on commit 75b0369

Please sign in to comment.