Skip to content

fix: Correctly handle empty'Local-Tenant-Id' header values - #39

Merged
mlakov merged 1 commit into
mainfrom
fix/correctly-handle-empty-local-tenant-id-header
Sep 24, 2026
Merged

mlakov merged 1 commit into
mainfrom
fix/correctly-handle-empty-local-tenant-id-header

Conversation

@mlakov

@mlakov mlakov commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Fix Empty Local Tenant Header Handling

Bug Fix

🐛 Normalizes Local-Tenant-Id request 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: Added Utils.Http.header(...) helper to safely read servlet headers and return null for 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 for Local-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 for Utils.Http.header(...) with null, empty, blank, and valid header values.
  • 🔄 Regenerate and Update Summary
PR Bot Information

Version: 1.31.51

  • Summary Prompt: Default Prompt
  • LLM: gpt-5.5
  • Output Template: Default Template
  • Event Trigger: pull_request.opened
  • Correlation ID: 19665450-b7e0-11f1-9ab4-50d125d1c032
  • File Content Strategy: Full file content

@hyperspace-pr-bot hyperspace-pr-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
mlakov force-pushed the fix/correctly-handle-empty-local-tenant-id-header branch from b77c732 to fa8552a Compare September 24, 2026 06:24
@mlakov mlakov changed the title fix: Correctly handle empty 'Local-Tenant-Id' header values fix: Correctly handle empty/blank 'Local-Tenant-Id' header values Sep 24, 2026
@mlakov mlakov changed the title fix: Correctly handle empty/blank 'Local-Tenant-Id' header values fix: Correctly handle empty'Local-Tenant-Id' header values Sep 24, 2026
@mlakov
mlakov merged commit 00757fd into main Sep 24, 2026
7 of 8 checks passed
@mlakov
mlakov deleted the fix/correctly-handle-empty-local-tenant-id-header branch September 24, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants