Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[THREESCALE-2205] Fix incorrect connection reuse #1021

Merged
merged 2 commits into from
Apr 25, 2019

Conversation

davidor
Copy link
Contributor

@davidor davidor commented Apr 25, 2019

Fixes https://issues.jboss.org/browse/THREESCALE-2205

By default, the 'connect' method of lua-resty-http, uses the ip and the host as the key to find a connection in the pool of idle connections. Ref: https://github.com/ledgetech/lua-resty-http#connect

That can cause problems in the case of HTTPS requests as mentioned in the issue linked above. For example, when 2 different domains resolve to the same IP, the connection is reused, and it should not be.

The 'connect_proxy' method of the modified module was using correct IDs for the pool, but the 'connect_direct' method was not.

Fixes https://issues.jboss.org/browse/THREESCALE-2205

By default, the 'connect' method of lua-resty-http, uses the ip and the
host as the key to find a connection in the pool of idle connections.
Ref: https://github.com/ledgetech/lua-resty-http#connect

That can cause problems in the case of HTTPS requests as mentioned in
the issue linked above. For example, when 2 different domains resolve to
the same IP, the connection is reused, and it should not be.

The 'connect_proxy' method of the modified module was using correct IDs
for the pool, but the 'connect_direct' method was not.
@davidor davidor requested a review from a team as a code owner April 25, 2019 12:57
@davidor davidor merged commit 773bb91 into master Apr 25, 2019
@davidor davidor deleted the fix-incorrect-connection-reuse branch April 25, 2019 13:46
@davidor
Copy link
Contributor Author

davidor commented Apr 25, 2019

/cc @mayorova

@mayorova
Copy link
Contributor

Awesome, thanks @davidor :)

davidor added a commit that referenced this pull request May 7, 2019
[THREESCALE-2205] Fix incorrect connection reuse
@davidor davidor mentioned this pull request May 7, 2019
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.

3 participants