NetServices: Notify any async listeners when a request completes early.
The API allows a user to end parsing responses earlier if the response has a client (4xx) or server (5xx) error code. The end user should still be notified of this result, so that they can act. Change-Id: I11f2ab296658f767b5b34e10badb54de27aab494 Reviewed-on: https://review.haiku-os.org/c/haiku/+/5910 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk> Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
parent
76ddb69a3a
commit
b70a0efa9e
@ -888,6 +888,8 @@ BHttpSession::Request::ReceiveResult()
|
||||
fResult->SetStatus(std::move(fStatus));
|
||||
fResult->SetFields(BHttpFields());
|
||||
fResult->SetBody();
|
||||
SendMessage(UrlEvent::RequestCompleted,
|
||||
[](BMessage& msg) { msg.AddBool(UrlEventData::Success, true); });
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user