Skip to content

fix(http-support): return null for missing native response headers#3879

Open
YianZhao wants to merge 2 commits intoeclipse-sw360:mainfrom
YianZhao:fix/native-response-header-null-clean
Open

fix(http-support): return null for missing native response headers#3879
YianZhao wants to merge 2 commits intoeclipse-sw360:mainfrom
YianZhao:fix/native-response-header-null-clean

Conversation

@YianZhao
Copy link
Contributor

@YianZhao YianZhao commented Mar 13, 2026

Closes: #3876

Description

The native HTTP response implementation does not follow the Response interface contract for missing headers.

Response.header(String name) documents that the method should return null if the requested header is not present. However, NewResponseImpl.header(String name) currently returns an empty string ("") instead.

This PR fixes the implementation to return null for missing headers.

Result

The native implementation now matches the documented interface contract.

@GMishx GMishx added needs code review needs general test This is general testing, meaning that there is no org specific issue to check for labels Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs code review needs general test This is general testing, meaning that there is no org specific issue to check for

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Native response header() returns empty string instead of null for missing headers

2 participants