summaryrefslogtreecommitdiff
path: root/main/busybox/0001-wget-ignore-header-casing.patch
blob: 5185023283a3b4dd488f899ba6241d6e2251ceb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From d5ae404155bb5faa587108928299598d59241205 Mon Sep 17 00:00:00 2001
From: Sertonix <sertonix@posteo.net>
Date: Mon, 3 Jun 2024 16:55:57 +0200
Subject: [PATCH] wget: ignore header casing

HTTP headers are case insensitive and therefor the check if a default
header has been overwritten needs to be case insensitive.

function                                             old     new   delta
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/0 up/down: 0/0)                 Total: 0 bytes
   text	  data	   bss	   dec	   hex	filename
1040876	 16443	  1840	1059159	102957	busybox_old
1040876	 16443	  1840	1059159	102957	busybox_unstripped
---
 networking/wget.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/networking/wget.c b/networking/wget.c
index 199ddd4da..512bebfc2 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -1602,7 +1602,7 @@ IF_DESKTOP(	"no-parent\0"        No_argument       "\xf0")
 			bit = 1;
 			words = wget_user_headers;
 			while (*words) {
-				if (strstr(hdr, words) == hdr) {
+				if (strcasestr(hdr, words) == hdr) {
 					G.user_headers |= bit;
 					break;
 				}
-- 
2.45.2