Lambdas in node 18.x (18.20.3) and problems with axios HPE_INVALID_HEADER_TOKEN #53196
Description
Version
18.20.3
Platform
No response
Subsystem
No response
What steps will reproduce the bug?
Hello everyone
Recently my newly deployed lambdas projects have started having problems with axios.
To give context, I had some lambdas in node, the last time they were deployed it was in LTS node 18.20.1, this week the lambdas have been redeployed, some without adulterating the logic and the axios calls that previously worked now throw the error " HPE_INVALID_HEADER_TOKEN", "Parse Error: Unexpected whitespace after header value."
It should be noted that the lambda that makes the call, as well as the one that returns the response, have not modified their behavior, the only thing that coincides is the launch of node 18.20.3 LTS a few days ago.
Initially using axios 1.6.8 and 1.7.1, tested with the latest version 1.7.2 and gives the same error.
Have you experienced something familiar or have some idea how to solve it, because setting the --insecure-http-parser flag makes it work, but it is not a viable option for me.
The headers were validated and do not contain white spaces at the beginning, at the end, or after the comma.
How often does it reproduce? Is there a required condition?
Whenever a request is made with axios
What is the expected behavior? Why is that the expected behavior?
Get a 200 response
What do you see instead?
HPE_INVALID_HEADER_TOKEN error, Parsing error: Unexpected whitespace after header value
Additional information
We are aware that the problem has occurred in lambdas deployed since Friday, May 25, but we cannot establish a start date for the problem.
Activity