Skip to content

HTTP proxy tests#1152

Merged
chrjohn merged 6 commits intoquickfix-j:masterfrom
the-thing:ssl-proxy-tests
Mar 10, 2026
Merged

HTTP proxy tests#1152
chrjohn merged 6 commits intoquickfix-j:masterfrom
the-thing:ssl-proxy-tests

Conversation

@the-thing
Copy link
Contributor

@the-thing the-thing commented Mar 3, 2026

Changes

  • simple HTTP proxy server implementation (base on Netty)
  • added tests for HTTP proxy with and without SSL
  • some common session and SSL code refactored

Initially I wanted to open a follow up PR that adds support for explicit proxy auth method for proxy servers that do not support response challenge, but

  1. I found out that it would require MINA change as well.
  2. According to RFC proxy server should (although not MUST) challenge an invalid request, so for the time being lets assume that everybody uses compliant HTTP proxy server.

https://datatracker.ietf.org/doc/html/rfc7235#section-2.1

Likewise, upon receipt of a request that omits proxy credentials or contains invalid or partial proxy credentials, a proxy that requires authentication SHOULD generate a 407 (Proxy Authentication Required) response that contains a Proxy-Authenticate header field with at least one (possibly new) challenge applicable to the proxy.

@the-thing the-thing requested a review from chrjohn March 10, 2026 14:01
@chrjohn chrjohn merged commit 9664d35 into quickfix-j:master Mar 10, 2026
12 checks passed
@chrjohn chrjohn added this to the QFJ 3.0.1 milestone Mar 10, 2026
@chrjohn
Copy link
Member

chrjohn commented Mar 10, 2026

@the-thing thank you, great addition to the test suite.

@the-thing
Copy link
Contributor Author

@chrjohn I think I have seen this write error when using HTTP proxy (close exception or something).

@the-thing the-thing deleted the ssl-proxy-tests branch March 10, 2026 15:31
@chrjohn
Copy link
Member

chrjohn commented Mar 10, 2026

Which write error? #1143 ??

@the-thing
Copy link
Contributor Author

the-thing commented Mar 10, 2026

Yes, that's the one. I think I have seen it when I was running the new tests locally. Maybe this could something be used for testing?

@chrjohn
Copy link
Member

chrjohn commented Mar 11, 2026

You mean use the http proxy to provoke the WriteToClosedSessionException? Do you think #1143 is sensible?

@the-thing
Copy link
Contributor Author

You mean use the http proxy to provoke the WriteToClosedSessionException?

Yes. Mostly for manual testing and debugging the problem, but maybe there can be some changes to capture exceptions for unit test cases to verify if this happens. Needs investigating.

Do you think #1143 is sensible?

It does look okish, but hold on for now. I might look at this is the upcoming days / weeks (not critical right?). Also org.apache.mina.core.write.WriteToClosedSessionException contains information about the request so might be worth logging it out what failed to write if not too long etc.

@chrjohn
Copy link
Member

chrjohn commented Mar 11, 2026

No need to rush, take your time. Thanks in advance!

Also org.apache.mina.core.write.WriteToClosedSessionException contains information about the request so might be worth logging it out what failed to write if not too long etc.

100% agree.

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