We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b604c3 commit b72e4ecCopy full SHA for b72e4ec
1 file changed
httpie/uploads.py
@@ -267,3 +267,8 @@ def compress_request(
267
request.body = deflated_data
268
request.headers['Content-Encoding'] = 'deflate'
269
request.headers['Content-Length'] = str(len(deflated_data))
270
+ content_type = request.headers.get('Content-Type') or b''
271
+ if isinstance(content_type, str):
272
+ content_type = content_type.encode()
273
+ if b'application/x-www-form-urlencoded' in content_type:
274
+ request.headers['Content-Type'] = b'multipart/form-data; boundary=httpie'
0 commit comments