We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15b7d4d commit 3e89fdcCopy full SHA for 3e89fdc
packages/grpc-js/src/http_proxy.ts
@@ -233,6 +233,12 @@ export function getProxiedConnection(
233
' through proxy ' +
234
proxyAddressString
235
);
236
+ // The HTTP client may have already read a few bytes of the proxied
237
+ // connection. If that's the case, put them back into the socket.
238
+ // See https://github.com/grpc/grpc-node/issues/2744.
239
+ if (head.length > 0) {
240
+ socket.unshift(head);
241
+ }
242
if ('secureContext' in connectionOptions) {
243
/* The proxy is connecting to a TLS server, so upgrade this socket
244
* connection to a TLS connection.
0 commit comments