diff options
author | Adriano Cordova <adrianox@gmail.com> | 2024-12-04 00:05:24 -0300 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2024-12-04 12:24:38 +0100 |
commit | 5a5c5bf40a0ea479426ad3f5c0cbc5afa675786f (patch) | |
tree | 938f403dcc3401b1ccf24d80a4e566c2c42df987 /lib/efi_loader/efi_device_path.c | |
parent | e55a4acb54e807c6411c4f6ab914fa2b3f55784e (diff) |
efi_loader: net: add support to send http requests and parse http headers
Add network-stack agnostic way to send an http request and
parse http headers from efi drivers. This uses wget as a
backend and communicates with it via efi_wget_info.
The function efi_net_do_request allocates a buffer on behalf of an
efi application using efi_alloc and passes it to wget to receive
the data. If the method is GET and the buffer is too small, it
re-allocates the buffer based on the last received Content-Length
header and tries again. If the method is HEAD it just issues one
request. So issuing a HEAD request (to update Content-Length) and
then a GET request is preferred but not required.
The function efi_net_parse_headers parses a raw buffer containing
an http header into an array of EFI specific 'http_header' structs.
Signed-off-by: Adriano Cordova <adrianox@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib/efi_loader/efi_device_path.c')
0 files changed, 0 insertions, 0 deletions