Repository: node
Issue: HTTP status code 102 not processed when using proxy
Labels: http

### Version

18.2.0

### Platform

Linux and MacOS

### Subsystem

_No response_

### What steps will reproduce the bug?

I prepared simple client & server - client asks, the server responds `102 Processing` and then `200 OK. When the connection between them is direct, everything works properly, but when we put in the middle some balancer (tested on nginx and AWS ELB) then clients get error "socket hang up".
After enabling debug logs, looks like the clients get a response from the server, but not parser does not start again and then an error is thrown.

`client.js`:
```js
var http = require('http');

    var options = {
        host: '127.0.0.1',
        path: '/testnode',
        port: process.env.PORT || 9010,
        method: 'POST',
    };

    var callback = function(response) {
        var str = ''

        response.on('data', function (chunk) {
            str += chunk;
        });

        response.on('end', function () {
            console.log('END:',str);
        });
    }

    var req = http.request(options, callback);
    req.write('');
    req.end();
    req.on('information', function(d) {
        console.log('Got '+d.statusCode);
    })
    req.on('socket', function(s) {
       s.on('data', (d) => console.log('Socket data: '+d.toString()))
    })
```

`server.js`:
```js
const port = process.env.PORT || 9010;

const express = require('express');
const app = express();

(async () => {
    app.post('/testnode', (req, res) => {
            res.writeProcessing();
            setTimeout(() => {
                res.json({
                    done: true
                });
            }, 1000);
    });

    app.listen(port, () => console.log(`[${process.pid}] Server listening at ${port}`));
})();
```

Result:
```console
NODE_DEBUG=http node client.js
HTTP 60881: call onSocket 0 0
HTTP 60881: createConnection 127.0.0.1:9010: [Object: null prototype] {
  host: '127.0.0.1',
  path: null,
  port: 9010,
  method: 'POST',
  noDelay: true,
  servername: '',
  _agentKey: '127.0.0.1:9010:'
}
HTTP 60881: sockets 127.0.0.1:9010: 1 1
HTTP 60881: write ret = true
HTTP 60881: outgoing message end.
HTTP 60881: AGENT incoming response!
Got 102
Socket data: HTTP/1.1 102 Processing


HTTP 60881: AGENT incoming response!
Socket data: HTTP/1.1 200 OK
X-Powered-By: Express
Content-Type: application/json; charset=utf-8
Content-Length: 13
ETag: W/"d-vfAVvdILIkmIo67j2sc7s17+9M0"
Date: Fri, 22 Jul 2022 09:26:38 GMT
Connection: close

{"done":true}
HTTP 60881: AGENT socket.destroySoon()
END: {"done":true}
HTTP 60881: CLIENT socket onClose
HTTP 60881: removeSocket 127.0.0.1:9010: writable: false
```

But when we setup some proxy, ex nginx:
```nginx
server {
	listen 80 default_server;
	
	root /var/www/html;

	location /testnode {
		proxy_pass http://127.0.0.1:9010/testnode;
                proxy_buffering off;
	}
}
```
Then client gets error:
```console
HTTP 61426: call onSocket 0 0
HTTP 61426: createConnection 127.0.0.1:80: [Object: null prototype] {
  host: '127.0.0.1',
  path: null,
  port: '80',
  method: 'POST',
  noDelay: true,
  servername: '',
  _agentKey: '127.0.0.1:80:'
}
HTTP 61426: sockets 127.0.0.1:80: 1 1
HTTP 61426: write ret = true
HTTP 61426: outgoing message end.
HTTP 61426: AGENT incoming response!
Got 102
Socket data: HTTP/1.1 102 Processing
Server: nginx/1.18.0 (Ubuntu)
Date: Fri, 22 Jul 2022 09:30:34 GMT
Connection: close


Socket data: HTTP/1.1 200 OK
X-Powered-By: Express
Content-Type: application/json; charset=utf-8
Content-Length: 13
ETag: W/"d-vfAVvdILIkmIo67j2sc7s17+9M0"
Date: Fri, 22 Jul 2022 09:30:37 GMT
Connection: close

{"done":true}
node:events:505
      throw er; // Unhandled 'error' event
      ^

Error: socket hang up
    at connResetException (node:internal/errors:693:14)
    at Socket.socketOnEnd (node:_http_client:478:23)
    at Socket.emit (node:events:539:35)
    at endReadableNT (node:internal/streams/readable:1344:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ClientRequest instance at:
    at Socket.socketOnEnd (node:_http_client:478:9)
    at Socket.emit (node:events:539:35)
    at endReadableNT (node:internal/streams/readable:1344:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  code: 'ECONNRESET'
}

Node.js v18.2.0
```

Clients get data though socket with 200 OK but it is not parsed again like the comment in the code says: https://github.com/nodejs/node/blob/v18.2.0/lib/_http_client.js#L591
Debug log "AGENT incoming response!" is not visible in output using a proxy.



### How often does it reproduce? Is there a required condition?

Using proxy between client & server is 100% reproducible.

### What is the expected behavior?

In both cases, everything should work.

### What do you see instead?

Error: socket hang up

### Additional information

When I use `fetch` as a client, both cases works properly.
```js
fetch('http://127.0.0.1:80/testnode', {method: 'POST'}).then(async (r) => {
        console.log('done', await r.text())
    }).catch((e) => {
        console.log(e)
    })
```