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

Mishandled request when 'Transfer-Encoding: chunked' is used on connection reuse. #2374

Open
1 of 2 tasks
timbyr opened this issue Feb 13, 2020 · 1 comment
Open
1 of 2 tasks

Comments

@timbyr
Copy link

timbyr commented Feb 13, 2020

Issue Type:

  • Bug report
  • Feature request

What happened:

When specifying Transfer-Encoding: chunked when an endpoint is dead and when trying to reuse a connection the second request never gets a response.
For example using curl to connect to a non existent endpoint twice.

curl --header "Transfer-Encoding: chunked" -x 127.0.0.1:4140 10.0.0.170:8000 10.0.0.170:8000

I get

Unable to establish connection to 10.0.0.170:8000.
service name: /svc/10.0.0.170:8000
client name: /$/inet/10.0.0.170/8000
addresses: [10.0.0.170:8000]
selected address: 10.0.0.170:8000

as a response and curl hangs while waiting on a response to the second request.

But when I don't specify transfer encoding it works as expected

curl -x 127.0.0.1:4140 10.0.0.170:8000 10.0.0.170:8000
Unable to establish connection to 10.0.0.170:8000.
service name: /svc/10.0.0.170:8000
client name: /$/inet/10.0.0.170/8000
addresses: [10.0.0.170:8000]
selected address: 10.0.0.170:8000
Unable to establish connection to 10.0.0.170:8000.
service name: /svc/10.0.0.170:8000
client name: /$/inet/10.0.0.170/8000
addresses: [10.0.0.170:8000]
selected address: 10.0.0.170:8000

There is nothing shown in any of the logs. I've confirmed this behaviour with 1.6.4 and 1.7.1. But it works correctly in 1.4.5 and 1.5.2.

Config is below

admin:
  port: 9990
  ip: 0.0.0.0
usage:
  enabled: false
routers:
- protocol: http
  label: incoming
  dtab: |
    /ip-hostport      => /$/inet;
    /ip               => /$/io.buoyant.hostportPfx/ip-hostport;
    /svc              => /ip;
  servers:
  - port: 4140
    ip: 0.0.0.0
@cpretzer
Copy link
Contributor

hi @timbyr I'm working to set up an environment where I can reproduce this behavior.

I'll have an update for you once I have that set up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

2 participants