fix: prevent unnecessary flattening of headers during convertRes#980
fix: prevent unnecessary flattening of headers during convertRes#980cboar wants to merge 1 commit intoopennextjs:mainfrom
Conversation
|
07df95a to
2e3faf1
Compare
|
@sommeeeer I see #977 solves a similar issue exclusively for For context, I am using a custom wrapper built for AWS ALB responses (not API Gateway), it has been helpful to not join the headers returned from InternalResult. |
commit: |
I ran into an issue where multiple
Set-Cookieheaders were being joined into a single header, which is not valid. I found that theconvertResfunction flattens all headers right before constructing theInternalResult. SinceInternalResultallowsstring[]headers, I rewrote theparseHeadersto keep these as is. Since the method is also used elsewhere, I renamed the original implementation toflattenHeadersto better reflect its behavior.Partially fixes #962