* Copyright (C) 2012-2013 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
+ * it under the terms of the GNU General Public License version 2,
+ * as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
exhaustResponse(get.getResponseBodyAsStream());
}
Log_OC.e(TAG, "Download of " + remoteFilePath + " to " + targetFile + " finished with HTTP status " + status + (!ret?"(FAIL)":""));
+
} catch (Exception e) {
logException(e, "dowloading " + remoteFilePath);
ret = (status == HttpStatus.SC_OK || status == HttpStatus.SC_ACCEPTED || status == HttpStatus.SC_NO_CONTENT);
exhaustResponse(delete.getResponseBodyAsStream());
- Log.e(TAG, "DELETE of " + remoteFilePath + " finished with HTTP status " + status + (!ret?"(FAIL)":""));
+ Log_OC.e(TAG, "DELETE of " + remoteFilePath + " finished with HTTP status " + status + (!ret?"(FAIL)":""));
} catch (Exception e) {
logException(e, "deleting " + remoteFilePath);
try {
File f = new File(localFile);
FileRequestEntity entity = new FileRequestEntity(f, contentType);
- entity.addOnDatatransferProgressListener(mDataTransferListener);
+ entity.addDatatransferProgressListener(mDataTransferListener);
put.setRequestEntity(entity);
status = executeMethod(put);
}
}
-
/**
* Requests the received method with the received timeout (milliseconds).
*
}
}
-
/**
* Logs an exception triggered in a HTTP request.
*