Skip to content

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

Open

Description

@timbyr

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

Activity

  1. self-assigned this
    on Feb 13, 2020
  2. cpretzer commented on Feb 21, 2020

    @cpretzer
    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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions