Fixes to multipart ajax requests