add upstream fixes
MT#6243 add multipart body functions

Backport from master