Part[] parts = null;
if (SIDLogin.isSidLogin()) {
// with session id
parts = new Part[3];
parts[0] = new StringPartNoTransferEncoding("sid", sid);
parts[1] = new StringPartNoTransferEncoding(
"ImportExportPassword", "");
parts[2] = new StringPartNoTransferEncoding("ConfigExport", "");
} else {
// old style, no session id
parts = new Part[2];
parts[0] = new StringPartNoTransferEncoding(
"ImportExportPassword", "");
parts[1] = new StringPartNoTransferEncoding("ConfigExport", "");
}
mPost.setRequestEntity(new MultipartRequestEntity(parts, mPost
.getParams()));