vkagamlyk commented on code in PR #2576:
URL: https://github.com/apache/tinkerpop/pull/2576#discussion_r1583706735


##########
gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/HttpRequestMessageDecoder.java:
##########
@@ -156,36 +153,20 @@ else if (accept.equals("text/plain")) {
      *     Request body contains serialized RequestMessage
      */
     public RequestMessageV4 getRequestMessageFromHttpRequest(final 
FullHttpRequest request,
-                                                                    
Map<String, MessageSerializer<?>> serializers) throws SerializationException {
+                                                                    
Map<String, MessageSerializerV4<?>> serializers) throws SerializationException {
         final String contentType = 
request.headers().get(HttpHeaderNames.CONTENT_TYPE);
 
-        if (request.method() == POST && contentType != null && 
!contentType.equals("application/json") && 
serializers.containsKey(contentType)) {
-            final MessageSerializer<?> serializer = 
serializers.get(contentType);
-            if (!(serializer instanceof MessageTextSerializerV4)) {
-                throw new SerializationException("Server only supports V4 or 
later serializers.");
+        if (contentType != null && !contentType.equals("application/json") && 
serializers.containsKey(contentType)) {
+            final MessageSerializerV4<?> serializer = 
serializers.get(contentType);
+            if (!(serializer instanceof MessageSerializerV4)) {

Review Comment:
   not needed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to