Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions messaging/mms/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def __init__(self):
'Message-Type': 'm-send-req',
'Transaction-Id': '1234',
'MMS-Version': '1.0',
'To': [],
'Content-Type': ('application/vnd.wap.multipart.mixed', {}),
}
self.width = 176
Expand Down
9 changes: 7 additions & 2 deletions messaging/mms/mms_pdu.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,8 +691,13 @@ def encode_message_header(self):
# -- this needs to be added last, according [2] and [4]
for hdr in headers_to_encode:
if hdr != 'Content-Type':
message_header.extend(
MMSEncoder.encode_header(hdr, headers_to_encode[hdr]))
if hdr == 'To':
for client in range(0, len(headers_to_encode[hdr])):
message_header.extend(
MMSEncoder.encode_header(hdr, headers_to_encode[hdr][client]))
else:
message_header.extend(
MMSEncoder.encode_header(hdr, headers_to_encode[hdr]))

# Ok, now only "Content-type" should be left
content_type, ct_parameters = headers_to_encode['Content-Type']
Expand Down