mirror of
https://github.com/nextcloud/android.git
synced 2024-11-29 10:49:04 +03:00
Merge pull request #5614 from nextcloud/postEncoding
Use UTF8 PostMethod everywhere
This commit is contained in:
commit
e891411a56
6 changed files with 17 additions and 17 deletions
|
@ -26,7 +26,7 @@ import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
|||
import com.owncloud.android.lib.common.utils.Log_OC;
|
||||
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
import org.apache.commons.httpclient.methods.PostMethod;
|
||||
import org.apache.commons.httpclient.methods.Utf8PostMethod;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -52,11 +52,11 @@ public class CreateFileFromTemplateOperation extends RemoteOperation {
|
|||
|
||||
protected RemoteOperationResult run(OwnCloudClient client) {
|
||||
RemoteOperationResult result;
|
||||
PostMethod postMethod = null;
|
||||
Utf8PostMethod postMethod = null;
|
||||
|
||||
try {
|
||||
|
||||
postMethod = new PostMethod(client.getBaseUri() + NEW_FROM_TEMPLATE_URL + JSON_FORMAT);
|
||||
postMethod = new Utf8PostMethod(client.getBaseUri() + NEW_FROM_TEMPLATE_URL + JSON_FORMAT);
|
||||
postMethod.setParameter("path", path);
|
||||
postMethod.setParameter("template", String.valueOf(templateId));
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
|||
import com.owncloud.android.lib.common.utils.Log_OC;
|
||||
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
import org.apache.commons.httpclient.methods.PostMethod;
|
||||
import org.apache.commons.httpclient.methods.Utf8PostMethod;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -51,10 +51,10 @@ public class StreamMediaFileOperation extends RemoteOperation {
|
|||
|
||||
protected RemoteOperationResult run(OwnCloudClient client) {
|
||||
RemoteOperationResult result;
|
||||
PostMethod postMethod = null;
|
||||
Utf8PostMethod postMethod = null;
|
||||
|
||||
try {
|
||||
postMethod = new PostMethod(client.getBaseUri() + STREAM_MEDIA_URL + JSON_FORMAT);
|
||||
postMethod = new Utf8PostMethod(client.getBaseUri() + STREAM_MEDIA_URL + JSON_FORMAT);
|
||||
postMethod.setParameter("fileId", fileID);
|
||||
|
||||
// remote request
|
||||
|
|
|
@ -67,8 +67,8 @@ import org.apache.commons.httpclient.HttpMethod;
|
|||
import org.apache.commons.httpclient.HttpStatus;
|
||||
import org.apache.commons.httpclient.methods.DeleteMethod;
|
||||
import org.apache.commons.httpclient.methods.GetMethod;
|
||||
import org.apache.commons.httpclient.methods.PostMethod;
|
||||
import org.apache.commons.httpclient.methods.PutMethod;
|
||||
import org.apache.commons.httpclient.methods.Utf8PostMethod;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.security.InvalidKeyException;
|
||||
|
@ -343,7 +343,7 @@ public class NotificationJob extends Job {
|
|||
break;
|
||||
|
||||
case "POST":
|
||||
method = new PostMethod(actionLink);
|
||||
method = new Utf8PostMethod(actionLink);
|
||||
break;
|
||||
|
||||
case "DELETE":
|
||||
|
|
|
@ -26,7 +26,7 @@ import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
|||
import com.owncloud.android.lib.common.utils.Log_OC;
|
||||
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
import org.apache.commons.httpclient.methods.PostMethod;
|
||||
import org.apache.commons.httpclient.methods.Utf8PostMethod;
|
||||
import org.json.JSONObject;
|
||||
|
||||
/**
|
||||
|
@ -52,10 +52,10 @@ public class RichDocumentsCreateAssetOperation extends RemoteOperation {
|
|||
|
||||
protected RemoteOperationResult run(OwnCloudClient client) {
|
||||
RemoteOperationResult result;
|
||||
PostMethod postMethod = null;
|
||||
Utf8PostMethod postMethod = null;
|
||||
|
||||
try {
|
||||
postMethod = new PostMethod(client.getBaseUri() + ASSET_URL);
|
||||
postMethod = new Utf8PostMethod(client.getBaseUri() + ASSET_URL);
|
||||
postMethod.setParameter(PARAMETER_PATH, path);
|
||||
postMethod.setParameter(PARAMETER_FORMAT, PARAMETER_FORMAT_VALUE);
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ import com.owncloud.android.lib.common.utils.Log_OC;
|
|||
import com.owncloud.android.utils.NextcloudServer;
|
||||
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
import org.apache.commons.httpclient.methods.PostMethod;
|
||||
import org.apache.commons.httpclient.methods.Utf8PostMethod;
|
||||
import org.json.JSONObject;
|
||||
|
||||
/**
|
||||
|
@ -60,10 +60,10 @@ public class RichDocumentsUrlOperation extends RemoteOperation {
|
|||
@NextcloudServer(max = 18)
|
||||
protected RemoteOperationResult run(OwnCloudClient client) {
|
||||
RemoteOperationResult result;
|
||||
PostMethod postMethod = null;
|
||||
Utf8PostMethod postMethod = null;
|
||||
|
||||
try {
|
||||
postMethod = new PostMethod(client.getBaseUri() + DOCUMENT_URL + JSON_FORMAT);
|
||||
postMethod = new Utf8PostMethod(client.getBaseUri() + DOCUMENT_URL + JSON_FORMAT);
|
||||
postMethod.setParameter(FILE_ID, fileID);
|
||||
|
||||
// remote request
|
||||
|
|
|
@ -14,8 +14,8 @@ import org.apache.commons.httpclient.HttpMethod;
|
|||
import org.apache.commons.httpclient.HttpStatus;
|
||||
import org.apache.commons.httpclient.methods.DeleteMethod;
|
||||
import org.apache.commons.httpclient.methods.GetMethod;
|
||||
import org.apache.commons.httpclient.methods.PostMethod;
|
||||
import org.apache.commons.httpclient.methods.PutMethod;
|
||||
import org.apache.commons.httpclient.methods.Utf8PostMethod;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -47,7 +47,7 @@ public class NotificationExecuteActionTask extends AsyncTask<Action, Void, Boole
|
|||
break;
|
||||
|
||||
case "POST":
|
||||
method = new PostMethod(action.link);
|
||||
method = new Utf8PostMethod(action.link);
|
||||
break;
|
||||
|
||||
case "DELETE":
|
||||
|
|
Loading…
Reference in a new issue