Open linlihuiyang opened 4 years ago
@linlihuiyang have u been able to resolve it? We are facing the same issue.
@linlihuiyang Through further debugging, this line tries to read the 'Content-Length' header from the response. And due to some reason, this header was removed. For us, the reason was a server-side monitoring tool 'Dynatrace'. It is adding cookie header to the original response and thus content-length is removed probably.
@pantsel are there any other ways to read the response body without using Content-Length header in TCP socket connection?
For now, as we can not remove the Dynatrace from client's setup, we have modified the access.lua to make an HTTP connection with the service. Please, if possible, guide us on if there are any risks in using HTTP instead of TCP.
FYI - we have tried receive("*a")
- it keeps the connection alive till the timeout and fails at browser due to timeout itself.
we have tried receive("*l")
- with a different regex as well, but it breaks after it has done reading the headers, not sure why.
@tushard-iprogrammer @linlihuiyang . Its very old thread. have you got any solution for this ?
Yeah. I had to rewrite some of the files. Basically, I rewrote them to use HTTP connection instead of TCP one.
And the main reason was:
Tushar Dahiwale Senior Software Engineer @.***
On Fri, 22 Oct 2021 at 00:15, abdulrazakbg @.***> wrote:
@tushard-iprogrammer https://github.com/tushard-iprogrammer @linlihuiyang https://github.com/linlihuiyang . Its very old thread. have you got any solution for this ?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pantsel/kong-middleman-plugin/issues/24#issuecomment-948903845, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADDVRRWJEU66KMYZU76YOADUIBNTBANCNFSM4LFVG7ZQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
access.lua:94 bad argument #1 to 'receive'(bad pattern argument)