You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/09/09 01:39:52 UTC

[GitHub] [druid] imply-cheddar commented on a diff in pull request #13052: Expose HTTP Response headers from SqlResource

imply-cheddar commented on code in PR #13052:
URL: https://github.com/apache/druid/pull/13052#discussion_r966548543


##########
sql/src/main/java/org/apache/druid/sql/http/SqlResource.java:
##########
@@ -185,20 +178,24 @@ public Response doPost(
                     endLifecycle(stmt, e, os.getCount());
                   }
                 }
-            )
-            .header(SQL_QUERY_ID_RESPONSE_HEADER, sqlQueryId);
-
-        if (sqlQuery.includeHeader()) {
-          responseBuilder.header(SQL_HEADER_RESPONSE_HEADER, SQL_HEADER_VALUE);
-        }
+              }
+          )
+          .header(SQL_QUERY_ID_RESPONSE_HEADER, sqlQueryId);
 
-        return responseBuilder.build();
-      }
-      catch (Throwable e) {
-        // make sure to close yielder if anything happened before starting to serialize the response.
-        yielder0.close();
-        throw new RuntimeException(e);
+      if (sqlQuery.includeHeader()) {
+        responseBuilder.header(SQL_HEADER_RESPONSE_HEADER, SQL_HEADER_VALUE);
       }
+

Review Comment:
   That's code that previously existed and I didn't change.  It just looks like I changed it because of diff stuff.  Look at lines 191-193 of the original.



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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