Skip to content

Commit

Permalink
fix: don't forget data right after header
Browse files Browse the repository at this point in the history
  • Loading branch information
schummar committed Jul 29, 2024
1 parent 797d250 commit d985e28
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/modem.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,9 @@ Modem.prototype.buildRequest = function (options, context, data, callback) {
req.on('upgrade', function (res, sock, head) {
if (finished === false) {
finished = true;
if (head.length > 0) {
sock.unshift(head);
}
return callback(null, sock);
}
});
Expand Down

0 comments on commit d985e28

Please sign in to comment.