fix: Correctly handle empty'Local-Tenant-Id' header values - #39
Merged
Merged
Conversation
There was a problem hiding this comment.
No substantive issues found in the modified lines. The change is small and covered by a focused parameterized test.
PR Bot Information
Version: 1.31.51
- Event Trigger:
pull_request.opened - Correlation ID:
19665450-b7e0-11f1-9ab4-50d125d1c032 - File Content Strategy: Full file content
- LLM:
gpt-5.5
mlakov
force-pushed
the
fix/correctly-handle-empty-local-tenant-id-header
branch
from
September 24, 2026 06:24
b77c732 to
fa8552a
Compare
InaGlushkova
approved these changes
Sep 24, 2026
mlakov
deleted the
fix/correctly-handle-empty-local-tenant-id-header
branch
September 24, 2026 06:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix Empty Local Tenant Header Handling
Bug Fix
🐛 Normalizes
Local-Tenant-Idrequest header handling so empty or blank header values are treated the same as missing headers. This prevents blank tenant IDs from being passed into ORD request contexts.Changes
cds-feature-ord/src/main/java/com/sap/cds/feature/ord/common/Utils.java: AddedUtils.Http.header(...)helper to safely read servlet headers and returnnullfor missing, empty, or blank values.cds-feature-ord/src/main/java/com/sap/cds/feature/ord/servlet/DocumentsServlet.java: Updated ORD document request context creation to use the new normalized header helper forLocal-Tenant-Id.cds-feature-ord/src/main/java/com/sap/cds/feature/ord/servlet/WellKnownServlet.java: Updated well-known endpoint request context creation to use the same normalized header behavior.cds-feature-ord/src/test/java/com/sap/cds/feature/ord/common/UtilsTest.java: Added parameterized coverage forUtils.Http.header(...)withnull, empty, blank, and valid header values.PR Bot Information
Version:
1.31.51gpt-5.5pull_request.opened19665450-b7e0-11f1-9ab4-50d125d1c032