multipart: ensure error on unexpected end of non-empty input