History log of /haiku/src/tests/kits/net/service/DataTest.cpp
Revision Date Author Comments
# 78b14420 24-Jul-2020 Leorize <leorize+oss@disroot.org>

libbnetapi: BUrlRequest now outputs to BDataIO

Previously, BUrlRequest returns data received via a callback that can't
return any value. This approach have several issues:

- It's not possible to signify failures to the request.
- Users have to implement custom listeners just to handle the common
case of outputting to a buffer/file/etc.
- The received data has to be serialized into BMessage when
BUrlProtocolDispatchingListener is employed. This can cause a
noticible slowdown in real-world scenarios as evident by #10748.

With this change, BUrlRequest will output directly into a BDataIO, which
exposes a richer API for request handlers to work with (for example a
BitTorrent client can request a BPositionIO for non-linear data
delivery), as well as simplifying common cases for users.

The adaptation only requires one additional API:
BHttpRequest::SetStopOnError(). This API simply instructs the HTTP
request handler to cancel the request if an HTTP error is occurred.

Change-Id: I4160884d77bff0e7678e0a623e2587987704443a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3084
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 85a6d653 30-Jan-2021 Niels Sascha Reedijk <niels.reedijk@gmail.com>

libnetservices.a: fix unit test builds after hrev54923


# e67a4284 16-Jul-2020 Leorize <leorize+oss@disroot.org>

libbnetapi: Disallow instantiation of BUrlRequest subclasses directly

This API change forces all creation of BUrlRequest to be done via
BUrlProtocolRoster::MakeRequest(). This allows the structure of protocol
addons to be altered without breaking ABI for client applications.

Change-Id: I1785c9136c50d19eaa9e57cb9d259ed8d88a5b56
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3080
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# b87a5280 22-May-2018 waddlesplash <waddlesplash@gmail.com>

tests: Fix the build under GCC 7.


# f0fbad6a 04-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Add tests for data URIs.


# f0fbad6aa1e4ab5b4b36d4ef3e6892c5873bb7ca 04-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Add tests for data URIs.