We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5547801 commit d0d737aCopy full SHA for d0d737a
src/zeep/utils.py
@@ -1,4 +1,4 @@
1
-import cgi
+from email.message import Message
2
import inspect
3
import typing
4
@@ -90,5 +90,8 @@ def detect_soap_env(envelope):
90
91
def get_media_type(value):
92
"""Parse a HTTP content-type header and return the media-type"""
93
- main_value, parameters = cgi.parse_header(value)
94
- return main_value.lower()
+ msg = Message()
+ msg['content-type'] = value
95
+
96
+ return msg.get_content_type()
97
0 commit comments