-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to complete request when response transformer plugin is active #1207
Comments
Maybe try to deactivate the "Accept-Encoding: gzip" header in your query? |
Disabling the compression did not fix the issue, e.g.:
I guess it is a problem with the body parser. When I comment the function |
Does anyone else experience the same problems? |
Fixed in #1263. The problem occurred due to whitespace changes. The header filter checked whether the body would be adjusted, and only if so, it would alter the content length. The body filter would NOT check whether there was anything to do, it would just parse the json, and re-encode the result. So in this case, the content length was unaltered, and the body just got re-jsonified with different whitespace settings. Causing a mismatch between the body and the set body length. Which caused the delay and timeout on the curl example which remained waiting for the missing whitespace bytes. thanks for your help in reporting and resolving! |
@johnpaul2 as a side note;
This means the upstream server "wasted" 1551 bytes in a single request on whitespace. You might want to reconfigure that. |
When I add the response transfomer plugin to an existing api the response is cut off.
Example:
When I call the API I get the following error:
The header is returned immediately. The error message appears after some time.
I have testeted this with kong 0.6.1, 0.7 and 0.8.1 and with different upstream urls.
The text was updated successfully, but these errors were encountered: