ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
mdl_net_resp_t Struct Reference

Per-transfer response metadata surfaced to the politeness governor. More...

#include <mdl_net.h>

Data Fields

long status
 Finished transfer's HTTP status, 0 if none.
char retry_after [k_mdl_retry_after_max]
 Raw Retry-After value, "" when absent.
char etag [k_mdl_etag_max]
 Raw ETag value, "" when absent.
char last_modified [k_mdl_last_mod_max]
 Raw Last-Modified value, "" when absent.
char content_type [k_mdl_content_type_max]
 Raw Content-Type value, "" when absent.

Detailed Description

Per-transfer response metadata surfaced to the politeness governor.

The fetch dispatchers fill one of these (when the caller passes a non-NULL pointer) so a caller can distinguish an absent page from a throttle from a server error and, on a throttle, honour the server's own Retry-After. It carries the finished transfer's HTTP status and the raw Retry-After header value verbatim – the governor parses the header (both delta-seconds and HTTP-date forms) through mdl_retry_after_parse, so the network backend never has to. An empty retry_after means the header was absent.

Invariant
retry_after is always NUL-terminated; retry_after[0] == '\0' exactly when the header was absent.
status == 0 means no HTTP status was observed (transport error before a response, or an argument the dispatcher refused).
See also
mdl_net_get_buf()
mdl_retry_after_parse()
Since
0.1.0

Definition at line 120 of file mdl_net.h.

Field Documentation

◆ content_type

char mdl_net_resp_t::content_type[k_mdl_content_type_max]

Raw Content-Type value, "" when absent.

Definition at line 125 of file mdl_net.h.

Referenced by internal_c6_get(), and internal_finish_transfer().

◆ etag

char mdl_net_resp_t::etag[k_mdl_etag_max]

Raw ETag value, "" when absent.

Definition at line 123 of file mdl_net.h.

Referenced by internal_c6_get(), internal_cache_record_response(), internal_finish_transfer(), and internal_mdl_fetch_publish_page().

◆ last_modified

char mdl_net_resp_t::last_modified[k_mdl_last_mod_max]

Raw Last-Modified value, "" when absent.

Definition at line 124 of file mdl_net.h.

Referenced by internal_c6_get(), internal_cache_record_response(), internal_finish_transfer(), and internal_mdl_fetch_publish_page().

◆ retry_after

char mdl_net_resp_t::retry_after[k_mdl_retry_after_max]

◆ status


The documentation for this struct was generated from the following file: