You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/10/19 10:51:07 UTC
[GitHub] [apisix] agile6v opened a new pull request #5286: fix: unable to read response body when proxied server returned chunked response
agile6v opened a new pull request #5286:
URL: https://github.com/apache/apisix/pull/5286
### What this PR does / why we need it:
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
unable to read response body when proxied server returned chunked response
### Pre-submission checklist:
* [x] Did you explain what problem does this PR solve? Or what new features have been added?
* [ ] Have you added corresponding test cases?
* [ ] Have you modified the corresponding document?
* [ ] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix/tree/master#community) first**
--
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
[GitHub] [apisix] agile6v commented on a change in pull request #5286: fix: unable to read response body when proxied server returned chunked response
Posted by GitBox <gi...@apache.org>.
agile6v commented on a change in pull request #5286:
URL: https://github.com/apache/apisix/pull/5286#discussion_r731794429
##########
File path: apisix/core/response.lua
##########
@@ -170,11 +170,13 @@ function _M.hold_body_chunk(ctx)
if eof then
body_buffer = ctx._body_buffer
if not body_buffer then
- return chunk
+ body_buffer = chunk
+ else
+ body_buffer = concat_tab(body_buffer, "", 1, body_buffer.n)
+ ctx._body_buffer = nil
end
- body_buffer = concat_tab(body_buffer, "", 1, body_buffer.n)
- ctx._body_buffer = nil
+ arg[1] = body_buffer
Review comment:
Oops! I missed the comments.
--
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
[GitHub] [apisix] agile6v closed pull request #5286: fix: unable to read response body when proxied server returned chunked response
Posted by GitBox <gi...@apache.org>.
agile6v closed pull request #5286:
URL: https://github.com/apache/apisix/pull/5286
--
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
[GitHub] [apisix] spacewander commented on a change in pull request #5286: fix: unable to read response body when proxied server returned chunked response
Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #5286:
URL: https://github.com/apache/apisix/pull/5286#discussion_r731755062
##########
File path: apisix/core/response.lua
##########
@@ -170,11 +170,13 @@ function _M.hold_body_chunk(ctx)
if eof then
body_buffer = ctx._body_buffer
if not body_buffer then
- return chunk
+ body_buffer = chunk
+ else
+ body_buffer = concat_tab(body_buffer, "", 1, body_buffer.n)
+ ctx._body_buffer = nil
end
- body_buffer = concat_tab(body_buffer, "", 1, body_buffer.n)
- ctx._body_buffer = nil
+ arg[1] = body_buffer
Review comment:
It is required by the called to update `arg[1]` herself. Please see the usage in the comment.
--
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