mangoGoForward commented on pull request #4956: URL: https://github.com/apache/apisix/pull/4956#issuecomment-911301560
> Good. I guess you can configure the eureka to let it always return gzip response? > https://github.com/apache/apisix/blob/991d093c4c23a8f2dd3b978c8e040340cd25efd3/ci/install-ext-services-via-docker.sh#L29 > > If you have trouble creating a test case, please let us know. I introduce the design ideas, When I run the eureka with Tomcat server which use source code to build by gradle, and I got some error logs after start apisix, because eureka returned gzip response, So I added a judgment logic: ``` local encoding = res.headers["Content-Encoding"] local res_body = res.body if encoding == 'gzip' then local stream = zlib.inflate() res_body = stream(res_body) end ``` It will use lua-zlib to unzip when get a gzip response. And sorry that I don't know how to create a test case, which can configure the eureka to let it both return gzip response and uncompresed response to test if logic -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
