You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2020/11/28 01:53:02 UTC

[incubator-doris] branch master updated: [Bug] Fix httpv2 append extra useless information in get_small_file api (#4953)

This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new c6bc30e  [Bug] Fix httpv2 append extra useless information in get_small_file api (#4953)
c6bc30e is described below

commit c6bc30e3757d0f82875851d6a23b94d4d58a1bf5
Author: Zhengguo Yang <ya...@gmail.com>
AuthorDate: Sat Nov 28 09:52:52 2020 +0800

    [Bug] Fix httpv2 append extra useless information in get_small_file api (#4953)
---
 .../java/org/apache/doris/httpv2/entity/ResponseEntityBuilder.java    | 4 ++++
 .../main/java/org/apache/doris/httpv2/rest/GetSmallFileAction.java    | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/httpv2/entity/ResponseEntityBuilder.java b/fe/fe-core/src/main/java/org/apache/doris/httpv2/entity/ResponseEntityBuilder.java
index 9b1034d..52db10e 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/httpv2/entity/ResponseEntityBuilder.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/httpv2/entity/ResponseEntityBuilder.java
@@ -48,6 +48,10 @@ public class ResponseEntityBuilder {
         return ResponseEntity.status(HttpStatus.OK).body(body);
     }
 
+    public static ResponseEntity okWithEmpty() {
+        return ResponseEntity.status(HttpStatus.OK).build();
+    }
+
     public static ResponseEntity unauthorized(Object data) {
         ResponseBody body = new ResponseBody().code(RestApiStatusCode.UNAUTHORIZED).msg("Unauthorized").data(data);
         return ResponseEntity.status(HttpStatus.OK).body(body);
diff --git a/fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/GetSmallFileAction.java b/fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/GetSmallFileAction.java
index 8e70312..38a1f88 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/GetSmallFileAction.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/GetSmallFileAction.java
@@ -73,6 +73,6 @@ public class GetSmallFileAction extends RestBaseController {
                 return ResponseEntityBuilder.internalError(e.getMessage());
             }
         }
-        return ResponseEntityBuilder.ok();
+        return ResponseEntityBuilder.okWithEmpty();
     }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org