Skip to content

Commit

Permalink
fix: missing some buffer contents in no-keepalive
Browse files Browse the repository at this point in the history
  • Loading branch information
KernelDeimos committed Jan 23, 2025
1 parent ee136f4 commit 3f5b34c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/puter-js/src/lib/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ export const make_http_api = ({ Socket, DEFAULT_PORT }) => {
};
const TRANSFER_NO_KEEPALIVE = {
data: data => {
if ( buffer ) {
const bin = encoder.encode(buffer);
data = new Uint8Array([...bin, ...data]);
buffer = '';
}
res.emit('data', decoder.decode(data));
}
};
Expand Down

0 comments on commit 3f5b34c

Please sign in to comment.