summaryrefslogtreecommitdiffstats
path: root/package/squid/squid-susv3-legacy.patch
blob: c3343bd2aab17e38bed347fbafdc56bb9850767b (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
[PATCH]  replace susv3 legacy functions with modern equivalents

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 src/ESIVarState.cc     |    6 +++---
 src/HttpHeaderTools.cc |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

Index: squid-3.0.STABLE21/src/ESIVarState.cc
===================================================================
--- squid-3.0.STABLE21.orig/src/ESIVarState.cc
+++ squid-3.0.STABLE21/src/ESIVarState.cc
@@ -207,7 +207,7 @@ ESIVariableUserAgent::getProductVersion 
 {
     char const *t;
     int len;
-    t = index (s,'/');
+    t = strchr (s,'/');
 
     if (!t || !*(++t))
         return xstrdup ("");
@@ -382,12 +382,12 @@ ESIVariableUserAgent::ESIVariableUserAge
 
         if ((t = strstr (s, "MSIE"))) {
             browser = ESI_BROWSER_MSIE;
-            t = index (t, ' ');
+            t = strchr (t, ' ');
 
             if (!t)
                 browserversion = xstrdup ("");
             else {
-                t1 = index (t, ';');
+                t1 = strchr (t, ';');
 
                 if (!t1)
                     browserversion = xstrdup (t + 1);
Index: squid-3.0.STABLE21/src/HttpHeaderTools.cc
===================================================================
--- squid-3.0.STABLE21.orig/src/HttpHeaderTools.cc
+++ squid-3.0.STABLE21/src/HttpHeaderTools.cc
@@ -357,7 +357,7 @@ httpHeaderParseQuotedString (const char 
     pos = start + 1;
 
     while (1) {
-        if (!(end = index (pos,'"'))) {
+        if (!(end = strchr (pos,'"'))) {
             debugs(66, 2, "failed to parse a quoted-string header field near '" << start << "'");
             return 0;
         }