Skip to content

[TT-274] Close target connection when request is canceled #3277

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

Merged
merged 3 commits into from
Sep 28, 2020

Conversation

gernest
Copy link
Contributor

@gernest gernest commented Aug 17, 2020

backport changes added to the net/http/httputil ReverseProxy for go1.15 .
See release notes here https://golang.org/doc/go1.15#net/http/httputil

Description

backport changes added to the net/http/httputil ReverseProxy for go1.15 .
See release notes here https://golang.org/doc/go1.15#net/http/httputil

Related Issue

golang/go#35559

Motivation and Context

How This Has Been Tested

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactoring or add test (improvements in base code or adds test coverage to functionality)

Checklist

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side). If pulling from your own
    fork, don't request your master!
  • Make sure you are making a pull request against the master branch (left side). Also, you should start
    your branch off our latest master.
  • My change requires a change to the documentation.
    • If you've changed APIs, describe what needs to be updated in the documentation.
    • If new config option added, ensure that it can be set via ENV variable
  • I have updated the documentation accordingly.
  • Modules and vendor dependencies have been updated; run go mod tidy && go mod vendor
  • When updating library version must provide reason/explanation for this update.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • Check your code additions will not fail linting checks:
    • go fmt -s
    • go vet

@gernest
Copy link
Contributor Author

gernest commented Aug 31, 2020

Most of the files are a result of go mod vendor The changes themselves are very minimal.

@gernest gernest requested review from devsergiy and sredxny and removed request for buger and furkansenharputlu September 21, 2020 08:55
@gernest gernest force-pushed the update-reverse-proxy branch 2 times, most recently from 319ac73 to 94a5957 Compare September 21, 2020 09:05
@gernest
Copy link
Contributor Author

gernest commented Sep 21, 2020

rebased, all the vendor files are gone now

Copy link
Contributor

@sredxny sredxny left a comment

Choose a reason for hiding this comment

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

@gernest looks good to me. Is there any Jira or GH issue that we can reference to this fix?

@gernest
Copy link
Contributor Author

gernest commented Sep 24, 2020

@sredxny we are using a modified copy of httputil.ReverseProxy from go std distribution. An actual issue is from go project golang/go#35559. So we are just backporting changes here to keep our ReverseProxy up to date with the upstream .

@@ -150,7 +150,7 @@ github.com/imdario/mergo
github.com/jensneuse/abstractlogger
# github.com/jensneuse/byte-template v0.0.0-20200214152254-4f3cf06e5c68
github.com/jensneuse/byte-template
# github.com/jensneuse/graphql-go-tools v0.0.0-00010101000000-000000000000 => github.com/TykTechnologies/graphql-go-tools v1.6.2-0.20200918115423-1f1792f5b6d9
# github.com/jensneuse/graphql-go-tools v0.0.0-00010101000000-000000000000 => github.com/TykTechnologies/graphql-go-tools v1.6.2-0.20200731074614-80c67fc17e8e
Copy link
Contributor

Choose a reason for hiding this comment

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

@gernest could you revert this? it is an incorrect version
and go 1.14 will check consistency between go.mod and modules.txt

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@spetrunin fixed 9cb3899

@matiasinsaurralde
Copy link
Contributor

@gernest LGTM, there are some conflicts on the tests.

ackport changes added to the net/http/httputil ReverseProxy for go1.15 .
See release notes here https://golang.org/doc/go1.15#net/http/httputil
This reverts commit 94a5957.
@gernest gernest force-pushed the update-reverse-proxy branch from 9cb3899 to 34181e9 Compare September 28, 2020 10:14
@gernest gernest merged commit b750c58 into master Sep 28, 2020
@gernest gernest deleted the update-reverse-proxy branch September 28, 2020 10:14
@matiasinsaurralde
Copy link
Contributor

/release to release-3-lts

@tykbot
Copy link

tykbot bot commented Oct 20, 2020

Working on it! Note that it can take a few minutes.

tykbot bot pushed a commit that referenced this pull request Oct 20, 2020
* Close target connection when request is canceled

ackport changes added to the net/http/httputil ReverseProxy for go1.15 .
See release notes here https://golang.org/doc/go1.15#net/http/httputil

* go mod vendor

* Revert "go mod vendor"

This reverts commit 94a5957.

(cherry picked from commit b750c58)
@tykbot
Copy link

tykbot bot commented Oct 20, 2020

@matiasinsaurralde Succesfully merged b750c58b23cb756fa4c659c2ceddf85da3e48a30 to release-3-lts branch.

@matiasinsaurralde
Copy link
Contributor

/release to release-3.1

@tykbot
Copy link

tykbot bot commented Oct 20, 2020

Working on it! Note that it can take a few minutes.

tykbot bot pushed a commit that referenced this pull request Oct 20, 2020
* Close target connection when request is canceled

ackport changes added to the net/http/httputil ReverseProxy for go1.15 .
See release notes here https://golang.org/doc/go1.15#net/http/httputil

* go mod vendor

* Revert "go mod vendor"

This reverts commit 94a5957.

(cherry picked from commit b750c58)
@tykbot
Copy link

tykbot bot commented Oct 20, 2020

@matiasinsaurralde Succesfully merged b750c58b23cb756fa4c659c2ceddf85da3e48a30 to release-3.1 branch.

furkansenharputlu pushed a commit that referenced this pull request Nov 2, 2021
* Close target connection when request is canceled

ackport changes added to the net/http/httputil ReverseProxy for go1.15 .
See release notes here https://golang.org/doc/go1.15#net/http/httputil

* go mod vendor

* Revert "go mod vendor"

This reverts commit 94a5957.
@furkansenharputlu
Copy link
Contributor

Merged manually to release-4

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.

5 participants