Skip to content

[backport camel-4.18.x] CAMEL-23698: Do not append trailing ? to URI when query string is empty#23801

Merged
davsclaus merged 1 commit into
camel-4.18.xfrom
backport/23797-to-camel-4.18.x
Jun 5, 2026
Merged

[backport camel-4.18.x] CAMEL-23698: Do not append trailing ? to URI when query string is empty#23801
davsclaus merged 1 commit into
camel-4.18.xfrom
backport/23797-to-camel-4.18.x

Conversation

@davsclaus
Copy link
Copy Markdown
Contributor

Backport of #23797

Cherry-pick of #23797 onto camel-4.18.x.

Original PR: #23797 - CAMEL-23698: Do not append trailing ? to URI when query string is empty
Original author: @davsclaus
Target branch: camel-4.18.x

Original description

  • Fix URISupport.createURIWithQuery() to not append a bare ? when the query string is empty
  • When camel-rest-openapi produces a REST call from an OpenAPI spec with optional query parameters that are not set, the URL ended with a trailing ? (e.g., /users/myuser/repos? instead of /users/myuser/repos)
  • Some HTTP servers and proxies treat /resource and /resource? differently, so this can cause issues

Claude Code on behalf of Claus Ibsen

…string is empty (#23797)

Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
@davsclaus davsclaus added the backport indicate that a Pull request is a backport from a fix from the main branch label Jun 5, 2026
@davsclaus davsclaus merged commit b5c8a88 into camel-4.18.x Jun 5, 2026
1 of 3 checks passed
@davsclaus davsclaus deleted the backport/23797-to-camel-4.18.x branch June 5, 2026 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport indicate that a Pull request is a backport from a fix from the main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant