diff options
Diffstat (limited to 'modules/transport-netty4/src/main/java/org/elasticsearch/http/netty4/Netty4HttpRequest.java')
-rw-r--r-- | modules/transport-netty4/src/main/java/org/elasticsearch/http/netty4/Netty4HttpRequest.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/modules/transport-netty4/src/main/java/org/elasticsearch/http/netty4/Netty4HttpRequest.java b/modules/transport-netty4/src/main/java/org/elasticsearch/http/netty4/Netty4HttpRequest.java index 5194c762b7..2ce6ffada6 100644 --- a/modules/transport-netty4/src/main/java/org/elasticsearch/http/netty4/Netty4HttpRequest.java +++ b/modules/transport-netty4/src/main/java/org/elasticsearch/http/netty4/Netty4HttpRequest.java @@ -119,7 +119,19 @@ public class Netty4HttpRequest extends RestRequest { return Method.OPTIONS; } - return Method.GET; + if (httpMethod == HttpMethod.PATCH) { + return Method.PATCH; + } + + if (httpMethod == HttpMethod.TRACE) { + return Method.TRACE; + } + + if (httpMethod == HttpMethod.CONNECT) { + return Method.CONNECT; + } + + throw new IllegalArgumentException("Unexpected http method: " + httpMethod); } @Override |