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-1781] Fix bug with proxied POST requests to HTTPS API backend via forward proxy #978

Merged
merged 3 commits into from
Jan 16, 2019

Conversation

davidor
Copy link
Contributor

@davidor davidor commented Jan 15, 2019

This PR fixes a bug that happens when proxying POST requests to an HTTPS upstream when using HTTPS_PROXY.

We were using resty.http's .get_client_body_reader(), but it looks like the result of that function is nil in this case.

I just changed that call with ngx.req.get_body_data(). The 2 tests added in this PR were failing before the change.

Ref: https://issues.jboss.org/browse/THREESCALE-1781

@davidor davidor requested a review from a team as a code owner January 15, 2019 15:01
We cannot use resty.http's .get_client_body_reader().
In some POST requests with HTTPS, the result of that call is nil, and it
results in a time-out.
@davidor davidor requested a review from mikz January 15, 2019 15:25
@davidor davidor added this to the 3.5 milestone Jan 15, 2019
Copy link
Contributor

@mikz mikz left a comment

Choose a reason for hiding this comment

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

It will also not work with chunked encoding, but there is a possibility it haven't worked before either.

@davidor davidor merged commit 75c2c02 into master Jan 16, 2019
@davidor davidor deleted the https-proxy-with-post-req branch January 16, 2019 10:13
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