From: Michael Brown Date: Thu, 28 Dec 2017 12:34:07 +0000 (+0000) Subject: [http] Include error messages for 4xx and 5xx response codes X-Git-Tag: v1.20.1~132 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea29122a70c6dd589530db72b82c011c7ecc5bb6;p=thirdparty%2Fipxe.git [http] Include error messages for 4xx and 5xx response codes Signed-off-by: Michael Brown --- diff --git a/src/net/tcp/httpcore.c b/src/net/tcp/httpcore.c index 4a1300cd7..01143a1a7 100644 --- a/src/net/tcp/httpcore.c +++ b/src/net/tcp/httpcore.c @@ -55,6 +55,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); #include #include #include +#include #include /* Disambiguate the various error causes */ @@ -110,6 +111,12 @@ static struct profiler http_rx_profiler __profiler = { .name = "http.rx" }; /** Data transfer profiler */ static struct profiler http_xfer_profiler __profiler = { .name = "http.xfer" }; +/** Human-readable error messages */ +struct errortab http_errors[] __errortab = { + __einfo_errortab ( EINFO_EIO_4XX ), + __einfo_errortab ( EINFO_EIO_5XX ), +}; + static struct http_state http_request; static struct http_state http_headers; static struct http_state http_trailers;