Group :: System/Kernel and hardware
RPM: shim
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: shim-15.4-upstream-0028-httpboot-Ignore-case-when-checking-HTTP-headers.patch
Download
Download
From 204f6bb5ba94061c8d0c60a6969fb263aadfce2d Mon Sep 17 00:00:00 2001
From: Robbie Harwood <rharwood@redhat.com>
Date: Wed, 1 Sep 2021 11:10:32 -0400
Subject: [PATCH 28/35] httpboot: Ignore case when checking HTTP headers
Some servers (HAProxy) yield Content-Length in lowercase, and shim would
fail to find it.
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
---
httpboot.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/httpboot.c b/httpboot.c
index 93d88931..5d16bc1e 100644
--- a/httpboot.c
+++ b/httpboot.c
@@ -571,7 +571,8 @@ receive_http_response(EFI_HTTP_PROTOCOL *http, VOID **buffer, UINT64 *buf_size)
/* Check the length of the file */
for (i = 0; i < rx_message.HeaderCount; i++) {
- if (!strcmp(rx_message.Headers[i].FieldName, (CHAR8 *)"Content-Length")) {
+ if (!strcasecmp(rx_message.Headers[i].FieldName,
+ (CHAR8 *)"Content-Length")) {
*buf_size = ascii_to_int(rx_message.Headers[i].FieldValue);
}
}
--
2.32.0