Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
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;
Expand All @@ -52,11 +52,11 @@ public CreateFileFromTemplateOperation(String path, int templateId) {

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));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
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;
Expand All @@ -36,7 +36,7 @@ public class StreamMediaFileOperation extends RemoteOperation {
private static final int SYNC_READ_TIMEOUT = 40000;
private static final int SYNC_CONNECTION_TIMEOUT = 5000;
private static final String STREAM_MEDIA_URL = "/ocs/v2.php/apps/dav/api/v1/direct";

private String fileID;

// JSON node names
Expand All @@ -51,10 +51,10 @@ public StreamMediaFileOperation(String fileID) {

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
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/owncloud/android/jobs/NotificationJob.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
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;
Expand Down Expand Up @@ -343,7 +343,7 @@ private int executeAction(String actionType, String actionLink, OwnCloudClient c
break;

case "POST":
method = new PostMethod(actionLink);
method = new Utf8PostMethod(actionLink);
break;

case "DELETE":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
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;

/**
Expand All @@ -52,10 +52,10 @@ public RichDocumentsCreateAssetOperation(String path) {

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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
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;

/**
Expand Down Expand Up @@ -60,10 +60,10 @@ public RichDocumentsUrlOperation(String fileID) {
@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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
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;

Expand Down Expand Up @@ -47,7 +47,7 @@ protected Boolean doInBackground(Action... actions) {
break;

case "POST":
method = new PostMethod(action.link);
method = new Utf8PostMethod(action.link);
break;

case "DELETE":
Expand Down