You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org> on 2023/04/14 02:56:42 UTC
[GitHub] [apisix] monkeyDluffy6017 commented on a diff in pull request #9289: fix: batch-requests: read trailer headers if exist
monkeyDluffy6017 commented on code in PR #9289:
URL: https://github.com/apache/apisix/pull/9289#discussion_r1166228488
##########
apisix/plugins/batch-requests.lua:
##########
@@ -275,7 +275,14 @@ local function batch_requests(ctx)
headers = resp.headers,
}
if resp.has_body then
- sub_resp.body = resp:read_body()
+ local err
+ sub_resp.body, err = resp:read_body()
+ if err then
+ sub_resp.read_body_err = err
+ core.log.error("read_body: ", err)
Review Comment:
core.log.error("read pipiline response body failed: ", err)
##########
apisix/plugins/batch-requests.lua:
##########
@@ -275,7 +275,14 @@ local function batch_requests(ctx)
headers = resp.headers,
}
if resp.has_body then
- sub_resp.body = resp:read_body()
+ local err
+ sub_resp.body, err = resp:read_body()
+ if err then
+ sub_resp.read_body_err = err
+ core.log.error("read_body: ", err)
+ elseif resp.read_trailers then
Review Comment:
Why check `resp.read_trailers` here?
The `read_trailers` must exist
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org