iPXE
Data Fields
http_response Struct Reference

An HTTP response. More...

#include <http.h>

Data Fields

struct line_buffer headers
 Raw response header lines. More...
 
unsigned int status
 Status code. More...
 
int rc
 Return status code. More...
 
const char * location
 Redirection location. More...
 
struct http_response_transfer transfer
 Transfer descriptor. More...
 
struct http_response_content content
 Content descriptor. More...
 
struct http_response_auth auth
 Authorization descriptor. More...
 
unsigned int retry_after
 Retry delay (in seconds) More...
 
unsigned int flags
 Flags. More...
 

Detailed Description

An HTTP response.

This represents a single response received from the server, including all values parsed from headers.

Pointers within this structure may point into the raw response buffer, and so should be invalidated when the response buffer is modified or discarded.

Definition at line 318 of file http.h.

Field Documentation

◆ headers

struct line_buffer http_response::headers

Raw response header lines.

This is the raw response data received from the server, up to and including the terminating empty line. String pointers within the response may point into this data buffer; NUL terminators will be added (overwriting the original terminating characters) as needed.

Definition at line 327 of file http.h.

Referenced by http_free(), http_parse_headers(), http_rx_headers(), and http_tx_request().

◆ status

unsigned int http_response::status

Status code.

This is the raw HTTP numeric status code (e.g. 404).

Definition at line 332 of file http.h.

Referenced by http_parse_status().

◆ rc

int http_response::rc

Return status code.

This is the iPXE return status code corresponding to the HTTP status code (e.g. -ENOENT).

Definition at line 338 of file http.h.

Referenced by http_content_buffer(), http_content_deliver(), http_parse_status(), and http_transfer_complete().

◆ location

const char* http_response::location

Redirection location.

Definition at line 340 of file http.h.

Referenced by http_parse_location(), and http_transfer_complete().

◆ transfer

struct http_response_transfer http_response::transfer

Transfer descriptor.

Definition at line 342 of file http.h.

Referenced by http_parse_transfer_encoding(), and http_rx_headers().

◆ content

struct http_response_content http_response::content

◆ auth

struct http_response_auth http_response::auth

◆ retry_after

unsigned int http_response::retry_after

Retry delay (in seconds)

Definition at line 348 of file http.h.

Referenced by http_parse_retry_after(), and http_transfer_complete().

◆ flags

unsigned int http_response::flags

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