Only add a Content-Type when it's not nil
Makes it possible to create MIME parts for non-file POST parameters when sending a file.unstable
parent
687c50d0cd
commit
4f2fd918e4
|
@ -88,7 +88,9 @@ class Message
|
|||
part.header.set("Content-Disposition", content_disposition)
|
||||
end
|
||||
|
||||
part.header.set("Content-Type", content_type)
|
||||
if (content_type)
|
||||
part.header.set("Content-Type", content_type)
|
||||
end
|
||||
|
||||
if (transfer_encoding)
|
||||
part.header.set("Content-Transfer-Encoding", transfer_encoding)
|
||||
|
|
Loading…
Reference in New Issue