http-proxy-middleware icon indicating copy to clipboard operation
http-proxy-middleware copied to clipboard

Proxying streaming audio APIs time out in node 16

Open allisonking opened this issue 3 years ago • 1 comments

Checks

Describe the bug (be clear and concise)

When upgrading from node 14 to node 16, proxying now times out for partial response streams (i.e. streaming audio).

Step-by-step reproduction instructions

Please see this github repo for repro instructions + minimal code: https://github.com/allisonking/http-proxy-middleware-repro

Expected behavior (be clear and concise)

Same behavior as node 14: proxying succeeds without hanging

How is http-proxy-middleware used in your project?

npm ls http-proxy-middleware
[email protected] ***/http-proxy-middleware-repro
└── [email protected]

What http-proxy-middleware configuration are you using?

Please see the github repo

What OS/version and node/version are you seeing the problem?

System:
    OS: macOS 10.15.7
    CPU: (4) x64 Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz
    Memory: 131.51 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 16.13.2 - ~/.nvm/versions/node/v16.13.2/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 8.1.2 - ~/.nvm/versions/node/v16.13.2/bin/npm
  Browsers:
    Chrome: 99.0.4844.51
    Firefox: 97.0.2
    Safari: 15.3

Additional context (optional)

There's a bit more context in this discussion q I put in earlier but I decided to promote it to a ticket now that I have a minimal reproducible github repo. Thanks for your help!

allisonking avatar Mar 10 '22 23:03 allisonking

I have encountered the same problem with my project. It should be the http-proxy package that the http-proxy-middleware depends on that is causing this problem.

The following link may solve your problem https://github.com/http-party/node-http-proxy/pull/1580

jprorikon avatar Apr 22 '22 09:04 jprorikon