1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 04:44:58 +00:00

LibWeb: Fully read body if there is one in fetch response handover

Required by XHR's reliance on Fetch.
This commit is contained in:
Luke Wilde 2023-02-28 18:48:59 +00:00 committed by Linus Groh
parent cfbd0bbe0a
commit e557602d34

View file

@ -648,11 +648,10 @@ WebIDL::ExceptionOr<void> fetch_response_handover(JS::Realm& realm, Infrastructu
process_body({});
});
}
// FIXME: 4. Otherwise, fully read responses body given processBody, processBodyError, and fetchParamss task
// destination.
// 4. Otherwise, fully read responses body given processBody, processBodyError, and fetchParamss task
// destination.
else {
// NOTE: This branch is not taken for JS fetch(), which supplies no 'process response consume body' function.
(void)process_body_error;
TRY(response.body()->fully_read(realm, move(process_body), move(process_body_error), fetch_params.task_destination()));
}
}