Skip to content

Add "Override local binding" to HTTP Sender#333

Merged
mgaffigan merged 6 commits into
OpenIntegrationEngine:mainfrom
jbeckers:feature/332-add-override-local-binding-to-http-sender
Jul 1, 2026
Merged

Add "Override local binding" to HTTP Sender#333
mgaffigan merged 6 commits into
OpenIntegrationEngine:mainfrom
jbeckers:feature/332-add-override-local-binding-to-http-sender

Conversation

@jbeckers

Copy link
Copy Markdown
Contributor

Fixes #332

@jbeckers

Copy link
Copy Markdown
Contributor Author

No AI was used in the making of this PR, only good ol' manual copy-paste.

@jbeckers

Copy link
Copy Markdown
Contributor Author

I tested this in a podman container with 2 bridged networks.

Results of "Test connection":

  • without override
no-override
  • with empty override
override-empty
  • with IP 10.88.0.6 override
override-88
  • with IP 10.89.0.3 override
override-89

@jbeckers

Copy link
Copy Markdown
Contributor Author

Sending a message IP 10.89.0.3 override
message

@jbeckers

Copy link
Copy Markdown
Contributor Author

This PR probably needs some unit tests. I'll work on that at the end of this week.

@jbeckers jbeckers force-pushed the feature/332-add-override-local-binding-to-http-sender branch from fba0393 to 4221c0a Compare June 30, 2026 19:25
@mgaffigan mgaffigan requested a review from Copilot June 30, 2026 19:40

Copilot AI 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.

Pull request overview

Adds an “Override Local Binding” option to the HTTP Sender so outbound HTTP connections (and the “Test Connection” action) can bind to a specific local source IP, aligning HTTP Sender capabilities with other connectors.

Changes:

  • Added overrideLocalBinding + localAddress properties to HTTP dispatcher settings and wired them through the client UI.
  • Applied Apache HTTP Client RequestConfig.Builder#setLocalAddress(...) when override is enabled.
  • Extended connection testing to optionally bind a local address during socket connection tests.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
server/src/com/mirth/connect/server/util/ConnectorUtil.java Adds an overload to allow connection tests to bind to a local address.
server/src/com/mirth/connect/connectors/http/HttpDispatcherProperties.java Introduces new HTTP sender properties for overriding local binding and storing a local address.
server/src/com/mirth/connect/connectors/http/HttpDispatcher.java Configures Apache HTTP client requests to bind to the configured local address when enabled.
server/src/com/mirth/connect/connectors/http/HttpConnectorServlet.java Updates “Test Connection” to optionally bind the local address when override is enabled.
client/src/com/mirth/connect/connectors/http/HttpSender.java Adds UI controls for “Override Local Binding” and “Local Address”, plus validation/reset behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread server/src/com/mirth/connect/connectors/http/HttpDispatcher.java
Comment thread server/src/com/mirth/connect/connectors/http/HttpDispatcher.java
Comment thread server/src/com/mirth/connect/connectors/http/HttpConnectorServlet.java Outdated

@mgaffigan mgaffigan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like a nice feature! I think some additional work is required to correct the velocity issue, and to fix the DCO check, but after that it looks good to me.

Thanks for sharing!

@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown

Test Results

  111 files    214 suites   6m 28s ⏱️
  651 tests   651 ✅ 0 💤 0 ❌
1 302 runs  1 302 ✅ 0 💤 0 ❌

Results for commit e8ddbc3.

♻️ This comment has been updated with latest results.

@mgaffigan mgaffigan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@jbeckers - looks all good. Can you fix the DCO? Need that before we can approve.

@kpalang kpalang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Some changes/clarifications required.

Review comments formatted as conventional comments

Comment thread client/src/com/mirth/connect/connectors/http/HttpSender.java Outdated
Comment thread client/src/com/mirth/connect/connectors/http/HttpSender.java
Comment thread client/src/com/mirth/connect/connectors/http/HttpSender.java Outdated
Comment thread server/src/com/mirth/connect/connectors/http/HttpConnectorServlet.java Outdated
Comment thread server/src/com/mirth/connect/connectors/http/HttpConnectorServlet.java Outdated
Comment thread server/src/com/mirth/connect/connectors/http/HttpDispatcher.java
Comment thread server/src/com/mirth/connect/server/util/ConnectorUtil.java Outdated
jbeckers and others added 6 commits July 1, 2026 20:33
Signed-off-by: Joachim Beckers <joachim.beckers@nexuzhealth.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Joachim Beckers <joachim@jbeckers.be>
Signed-off-by: Joachim Beckers <joachim.beckers@nexuzhealth.com>
Signed-off-by: Joachim Beckers <joachim.beckers@nexuzhealth.com>
Signed-off-by: Joachim Beckers <joachim.beckers@nexuzhealth.com>
…formed()

Signed-off-by: Joachim Beckers <joachim.beckers@nexuzhealth.com>
Signed-off-by: Joachim Beckers <joachim.beckers@nexuzhealth.com>
@jbeckers jbeckers force-pushed the feature/332-add-override-local-binding-to-http-sender branch from b6f58bd to e8ddbc3 Compare July 1, 2026 18:34
@jbeckers

jbeckers commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

@jbeckers - looks all good. Can you fix the DCO? Need that before we can approve.

I force pushed the amended commits

@jbeckers jbeckers requested review from kpalang and mgaffigan July 1, 2026 19:50

@kpalang kpalang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍

@mgaffigan mgaffigan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@NicoPiel NicoPiel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

@mgaffigan mgaffigan merged commit d4d1122 into OpenIntegrationEngine:main Jul 1, 2026
4 checks passed
@jbeckers

jbeckers commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Thanks everyone!

I'd love it if this change could land in 4.6.0-rc2.

But I guess an RC shouldn't contain any new features?

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.

[IDEA] Add 'Override local binding' to HTTP Sender

5 participants