Skip to content

Commit 17e5024

Browse files
authored
Merge pull request #1270 from ProgrammerIn-wonderland/main
fix accidental checking of requestHead when responseHead should be checked
2 parents 9b3aa25 + 2a16a25 commit 17e5024

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/puter-js/src/modules/networking/requests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export function pFetch(...args) {
9191
responseHead += decoder.decode(data, { stream: true });
9292

9393
// See if we have the HEAD of an HTTP/1.1 yet
94-
if (reqHead.indexOf("\r\n\r\n") !== -1) {
94+
if (responseHead.indexOf("\r\n\r\n") !== -1) {
9595
dataOffset = responseHead.indexOf("\r\n\r\n");
9696
responseHead = responseHead.slice(0, dataOffset);
9797
const parsedHead = parseHTTPHead(responseHead);

0 commit comments

Comments
 (0)