aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2024-03-29 12:35:12 +0000
committerMichael Brown <mcb30@ipxe.org>2024-03-29 14:46:13 +0000
commit764e34f15af89cc7c5e46694ac15c5266f13b3d3 (patch)
tree894981df32add4348870f1c4f147b15508841312
parentafae8817826ef8356b89a5e131ff42750ab267d4 (diff)
downloadipxe-764e34f15af89cc7c5e46694ac15c5266f13b3d3.zip
ipxe-764e34f15af89cc7c5e46694ac15c5266f13b3d3.tar.gz
ipxe-764e34f15af89cc7c5e46694ac15c5266f13b3d3.tar.bz2
[http] Add error table entry for HTTP 404 Not Found error
Add an abbreviated "Not found" error message for an HTTP 404 status code, so that any automatic attempt to download a non-existent autoexec.ipxe script produces only a minimal error message. Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r--src/net/tcp/httpcore.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/net/tcp/httpcore.c b/src/net/tcp/httpcore.c
index 9ad3965..af2a237 100644
--- a/src/net/tcp/httpcore.c
+++ b/src/net/tcp/httpcore.c
@@ -89,7 +89,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
__einfo_uniqify ( EINFO_EIO, 0x05, "HTTP 5xx Server Error" )
#define ENOENT_404 __einfo_error ( EINFO_ENOENT_404 )
#define EINFO_ENOENT_404 \
- __einfo_uniqify ( EINFO_ENOENT, 0x01, "HTTP 404 Not Found" )
+ __einfo_uniqify ( EINFO_ENOENT, 0x01, "Not found" )
#define ENOTSUP_CONNECTION __einfo_error ( EINFO_ENOTSUP_CONNECTION )
#define EINFO_ENOTSUP_CONNECTION \
__einfo_uniqify ( EINFO_ENOTSUP, 0x01, "Unsupported connection header" )
@@ -114,6 +114,7 @@ static struct profiler http_xfer_profiler __profiler = { .name = "http.xfer" };
/** Human-readable error messages */
struct errortab http_errors[] __errortab = {
+ __einfo_errortab ( EINFO_ENOENT_404 ),
__einfo_errortab ( EINFO_EIO_4XX ),
__einfo_errortab ( EINFO_EIO_5XX ),
};