Skip to content
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

Laminas/HTTP/Response add extra space in header value #99

Open
HeenaBansal20 opened this issue Feb 18, 2025 · 0 comments
Open

Laminas/HTTP/Response add extra space in header value #99

HeenaBansal20 opened this issue Feb 18, 2025 · 0 comments
Labels
Bug Something isn't working

Comments

@HeenaBansal20
Copy link

HeenaBansal20 commented Feb 18, 2025

Bug Report

Q A
Version(s) All

Summary

HTTP/Response::getHeaders() returns header like key:<space>value even when the header sent by application is key:value .

Current behavior

sendResponse(method, requestTarget, resOrStream, 200, JSON.stringify(incomingHeaders2, null, 2), {
    'Content-Type': 'application/json',
    'X-Response-Header-Downstream-To-App': 'Value 3',
  });
}

However when reading headers from laminas/API/response::getHeaders() , I received the headers like:

'Content-Type':  'application/json',
'X-Response-Header-To-App':  'Value 3'

How to reproduce

Any node js application which sends header in above format and laminas application received the requests and print headers.

Expected behavior

headers should propagated as it is what framework received.

@HeenaBansal20 HeenaBansal20 added the Bug Something isn't working label Feb 18, 2025
@HeenaBansal20 HeenaBansal20 changed the title API/Response add extra space in header value Laminas/HTTP/Response add extra space in header value Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant