diff options
| author | Robbie Harwood <rharwood@redhat.com> | 2021-09-01 11:10:32 -0400 |
|---|---|---|
| committer | Robbie Harwood <rharwood@redhat.com> | 2021-09-01 11:10:32 -0400 |
| commit | 204f6bb5ba94061c8d0c60a6969fb263aadfce2d (patch) | |
| tree | 0bec383b9f8e2afa7231f09b58d2cbd7808c032a /httpboot.c | |
| parent | 1b30c2b9e5ee7d3e305a28a92805152d5cbfc9cb (diff) | |
| download | efi-boot-shim-204f6bb5ba94061c8d0c60a6969fb263aadfce2d.tar.gz efi-boot-shim-204f6bb5ba94061c8d0c60a6969fb263aadfce2d.zip | |
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>
Diffstat (limited to 'httpboot.c')
| -rw-r--r-- | httpboot.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); } } |
