[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] http: fix superfluous null line in range request header

From: Michael Chang
Subject: [PATCH] http: fix superfluous null line in range request header
Date: Wed, 6 Apr 2016 18:19:14 +0800
User-agent: Mutt/1.5.24 (2015-08-30)

At least the apache sever is very unhappy with that extra null line and will
take more than ten seconds in responding to each range request, which slows
down a lot the entire http file transfer process or even time out.
 grub-core/net/http.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/grub-core/net/http.c b/grub-core/net/http.c
index 4684f8b..a7c5101 100644
--- a/grub-core/net/http.c
+++ b/grub-core/net/http.c
@@ -381,9 +381,8 @@ http_establish (struct grub_file *file, grub_off_t offset, 
int initial)
       ptr = nb->tail;
       grub_snprintf ((char *) ptr,
                     sizeof ("Range: bytes=XXXXXXXXXXXXXXXXXXXX-"
-                            "\r\n"
-                    "Range: bytes=%" PRIuGRUB_UINT64_T "-\r\n\r\n",
+                    "Range: bytes=%" PRIuGRUB_UINT64_T "-\r\n",
       grub_netbuff_put (nb, grub_strlen ((char *) ptr));

reply via email to

[Prev in Thread] Current Thread [Next in Thread]