From: Jamo <jamofer@gmail.com>
To: jamofer@gmail.com
Cc: The development of GNU GRUB <grub-devel@gnu.org>
Subject: [PATCH] http module is not checking correctly HTTP headers
Date: Fri, 14 Jan 2022 00:05:59 +0100 [thread overview]
Message-ID: <20220113230556.162283-1-jamofer@gmail.com> (raw)
In-Reply-To: <CAO3k2X1E2Zistzt7HTBTQL7kbdSUqfUhPuKL2Zoj1BZvA8cK7Q@mail.gmail.com>
From: Javier Moragon <jamofer@gmail.com>
I applied the last suggestion in this patch and I've finally realized
how to use git send-email.
I'm sorry for the unnecesary mails and I hope for next contributions
I won't make the same mistakes, Thank you!
---
grub-core/net/http.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/grub-core/net/http.c b/grub-core/net/http.c
index b616cf40b..7a56ec7ef 100644
--- a/grub-core/net/http.c
+++ b/grub-core/net/http.c
@@ -130,7 +130,7 @@ parse_line (grub_file_t file, http_data_t data, char *ptr, grub_size_t len)
data->first_line_recv = 1;
return GRUB_ERR_NONE;
}
- if (grub_memcmp (ptr, "Content-Length: ", sizeof ("Content-Length: ") - 1)
+ if (grub_strncasecmp (ptr, "Content-Length: ", sizeof ("Content-Length: ") - 1)
== 0 && !data->size_recv)
{
ptr += sizeof ("Content-Length: ") - 1;
@@ -138,8 +138,8 @@ parse_line (grub_file_t file, http_data_t data, char *ptr, grub_size_t len)
data->size_recv = 1;
return GRUB_ERR_NONE;
}
- if (grub_memcmp (ptr, "Transfer-Encoding: chunked",
- sizeof ("Transfer-Encoding: chunked") - 1) == 0)
+ if (grub_strncasecmp (ptr, "Transfer-Encoding: chunked",
+ sizeof ("Transfer-Encoding: chunked") - 1) == 0)
{
data->chunked = 1;
return GRUB_ERR_NONE;
--
2.32.0
next prev parent reply other threads:[~2022-01-13 23:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-12 22:54 [PATCH] http module is not checking correctly HTTP headers Javier Moragon
2022-01-13 4:08 ` Glenn Washburn
2022-01-13 22:14 ` Javier Moragon
2022-01-13 23:05 ` Jamo [this message]
2022-01-14 3:26 ` Glenn Washburn
2022-01-13 23:10 ` Glenn Washburn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220113230556.162283-1-jamofer@gmail.com \
--to=jamofer@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.