#
7b1d966c |
| 08-Aug-2022 |
Niels Sascha Reedijk <niels.reedijk@gmail.com> |
NetServices: Rework parsing of content-length and move to HttpParser
This fixes a bug in the HttpAuthTest, and in general, moves responsibility of determining the shape and size of the content to th
NetServices: Rework parsing of content-length and move to HttpParser
This fixes a bug in the HttpAuthTest, and in general, moves responsibility of determining the shape and size of the content to the right place.
Still to do is to fix the case where there really is a variable length content. This will now probably error out as a connection closed error.
Change-Id: I13c20028e834cc9af8c7bc1d7d7613bf60838e64
show more ...
|
#
8ccf8fb4 |
| 10-Apr-2022 |
Niels Sascha Reedijk <niels.reedijk@gmail.com> |
NetServices: Rewrite BHttpFields to use raw strings as underlying data storage
This change also drops the principle that fields with the same keys would be grouped together. This was initially inspi
NetServices: Rewrite BHttpFields to use raw strings as underlying data storage
This change also drops the principle that fields with the same keys would be grouped together. This was initially inspired by Boost::Beast, but it means a lot of extra copying of data when adding/organizing the list, as well as inefficient querying on each add. Now that the design choice is to fully go for the raw string as underlying data storage, that choice is not necessary. In the future it may be able to emulate the grouping or retrieving of lists of values in the API, rather than as a fundamental principle of the data storage.
Change-Id: I2667cfa38eb3b7b75393ee71fb038231a40b4193
show more ...
|
#
a8003a70 |
| 08-Feb-2022 |
Niels Sascha Reedijk <niels.reedijk@gmail.com> |
NetServices: Introduce BHttpFields to query and manipulate fields in HTTP messages
HTTP messages (requests and responses) have a header section that can contain HTTP headers. These headers consist o
NetServices: Introduce BHttpFields to query and manipulate fields in HTTP messages
HTTP messages (requests and responses) have a header section that can contain HTTP headers. These headers consist of name, value pairs. This class can be used to query the headers on a response, and build a list of headers for a request.
The internal implementation is designed around two different methods of storing the underlying data. For HTTP requests, the name, value pairs are stored as owned BString objects. For responses, the assumption is that there is a byte buffer that contains the data and that has the same lifetime as the BHttpFields object. The name, value pairs will then be stored as std::string_view to the underlying buffer.
Still to do is: - The method to convert a BHttpFields list into a string buffer to transmit. - The method to parse a string buffer and turn it into a BHttpFields object.
Change-Id: I4819db100aa1671aa7403675216a4c85fd221da7
show more ...
|