[OLINGO-482] non-standard HTTP MERGE not to be used in server part
Change-Id: I425dd5b79617ca7f1a56818d0bb106611792ebd5 Signed-off-by: Christian Amend <chrisam@apache.org>
This commit is contained in:
parent
a405e5b4b5
commit
300250af3c
|
@ -84,7 +84,6 @@ public class UriValidator {
|
|||
/* PUT 0 */ { false , false , false , false, false , false , false , false , false , false , false , false },
|
||||
/* DELETE 0 */ { false , false , false , false, false , false, false , false, false , false , false, false },
|
||||
/* PATCH 0 */ { false , false , false , false, false , false , false , false , false , false , false , false },
|
||||
/* MERGE 0 */ { false , false , false , false, false , false , false , false , false , false , false , false },
|
||||
};
|
||||
|
||||
//CHECKSTYLE:ON
|
||||
|
@ -154,8 +153,7 @@ public class UriValidator {
|
|||
POST(1),
|
||||
PUT(2),
|
||||
DELETE(3),
|
||||
MERGE(4),
|
||||
PATCH(5);
|
||||
PATCH(4);
|
||||
|
||||
private int idx;
|
||||
|
||||
|
@ -602,9 +600,6 @@ public class UriValidator {
|
|||
case PATCH:
|
||||
idx = RowIndexForHttpMethod.PATCH;
|
||||
break;
|
||||
case MERGE:
|
||||
idx = RowIndexForHttpMethod.MERGE;
|
||||
break;
|
||||
default:
|
||||
throw new UriValidationException("HTTP method not supported: " + httpMethod,
|
||||
UriValidationException.MessageKeys.UNSUPPORTED_HTTP_METHOD, httpMethod.toString());
|
||||
|
|
|
@ -38,7 +38,6 @@ public class ODataHttpHandlerImplTest {
|
|||
{ "GET", null, null, "GET" },
|
||||
{ "GET", "xxx", "yyy", "GET" },
|
||||
{ "PUT", "xxx", "yyy", "PUT" },
|
||||
{ "MERGE", "xxx", "yyy", "MERGE" },
|
||||
{ "DELETE", "xxx", "yyy", "DELETE" },
|
||||
{ "PATCH", "xxx", "yyy", "PATCH" },
|
||||
|
||||
|
@ -47,7 +46,7 @@ public class ODataHttpHandlerImplTest {
|
|||
{ "POST", null, "PATCH", "PATCH" },
|
||||
|
||||
{ "POST", "GET", null, "GET" },
|
||||
{ "POST", "MERGE", null, "MERGE" },
|
||||
{ "POST", "PATCH", null, "PATCH" },
|
||||
|
||||
{ "POST", "GET", "GET", "GET" },
|
||||
};
|
||||
|
@ -71,7 +70,7 @@ public class ODataHttpHandlerImplTest {
|
|||
public void extractMethodFail() throws Exception {
|
||||
String[][] mm = {
|
||||
{ "POST", "bla", null },
|
||||
{ "POST", "MERGE", "PATCH" },
|
||||
{ "POST", "PUT", "PATCH" },
|
||||
{ "OPTIONS", null, null },
|
||||
{ "HEAD", null, null },
|
||||
};
|
||||
|
|
|
@ -77,7 +77,6 @@ public class ODataHandlerTest {
|
|||
dispatchMethodNotAllowed(HttpMethod.POST, "/", processor);
|
||||
dispatchMethodNotAllowed(HttpMethod.PUT, "/", processor);
|
||||
dispatchMethodNotAllowed(HttpMethod.PATCH, "/", processor);
|
||||
dispatchMethodNotAllowed(HttpMethod.MERGE, "/", processor);
|
||||
dispatchMethodNotAllowed(HttpMethod.DELETE, "/", processor);
|
||||
}
|
||||
|
||||
|
@ -116,7 +115,6 @@ public class ODataHandlerTest {
|
|||
dispatchMethodNotAllowed(HttpMethod.POST, "$metadata", processor);
|
||||
dispatchMethodNotAllowed(HttpMethod.PUT, "$metadata", processor);
|
||||
dispatchMethodNotAllowed(HttpMethod.PATCH, "$metadata", processor);
|
||||
dispatchMethodNotAllowed(HttpMethod.MERGE, "$metadata", processor);
|
||||
dispatchMethodNotAllowed(HttpMethod.DELETE, "$metadata", processor);
|
||||
}
|
||||
|
||||
|
|
|
@ -266,7 +266,6 @@ public class UriValidatorTest {
|
|||
validator.validate(uri, HttpMethod.PUT);
|
||||
validator.validate(uri, HttpMethod.DELETE);
|
||||
validator.validate(uri, HttpMethod.PATCH);
|
||||
validator.validate(uri, HttpMethod.MERGE);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue