Skip to content

CAMEL-23052: Use type converter for HTTP query header in HttpSendDynamicAware#21963

Open
gnodet wants to merge 1 commit intomainfrom
camel-23052-http-query-typeconverter
Open

CAMEL-23052: Use type converter for HTTP query header in HttpSendDynamicAware#21963
gnodet wants to merge 1 commit intomainfrom
camel-23052-http-query-typeconverter

Conversation

@gnodet
Copy link
Contributor

@gnodet gnodet commented Mar 13, 2026

Summary

  • Fixed HttpSendDynamicAware.createPreProcessor() to use getHeader(key, String.class) instead of casting (String) getHeader(key) for both HTTP_QUERY and HTTP_PATH headers, preventing ClassCastException when header values are non-String types (e.g., Integer).
  • Added unit tests verifying that non-String header values (Integer) are properly converted to String via the type converter.

Test plan

  • Unit tests added in HttpSendDynamicAwareTest covering Integer-valued HTTP_QUERY, Integer-valued HTTP_PATH, and String-valued HTTP_QUERY headers
  • All existing tests in camel-http-base pass

…micAware

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using build-all, build-dependents, skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@gnodet gnodet marked this pull request as ready for review March 13, 2026 08:03
@gnodet gnodet added the enhancement New feature or request label Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

components enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants