squid-susv3-legacy.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. [PATCH] replace susv3 legacy functions with modern equivalents
  2. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
  3. ---
  4. src/ESIVarState.cc | 6 +++---
  5. src/HttpHeaderTools.cc | 2 +-
  6. 2 files changed, 4 insertions(+), 4 deletions(-)
  7. Index: squid-3.0.STABLE21/src/ESIVarState.cc
  8. ===================================================================
  9. --- squid-3.0.STABLE21.orig/src/ESIVarState.cc
  10. +++ squid-3.0.STABLE21/src/ESIVarState.cc
  11. @@ -207,7 +207,7 @@ ESIVariableUserAgent::getProductVersion
  12. {
  13. char const *t;
  14. int len;
  15. - t = index (s,'/');
  16. + t = strchr (s,'/');
  17. if (!t || !*(++t))
  18. return xstrdup ("");
  19. @@ -382,12 +382,12 @@ ESIVariableUserAgent::ESIVariableUserAge
  20. if ((t = strstr (s, "MSIE"))) {
  21. browser = ESI_BROWSER_MSIE;
  22. - t = index (t, ' ');
  23. + t = strchr (t, ' ');
  24. if (!t)
  25. browserversion = xstrdup ("");
  26. else {
  27. - t1 = index (t, ';');
  28. + t1 = strchr (t, ';');
  29. if (!t1)
  30. browserversion = xstrdup (t + 1);
  31. Index: squid-3.0.STABLE21/src/HttpHeaderTools.cc
  32. ===================================================================
  33. --- squid-3.0.STABLE21.orig/src/HttpHeaderTools.cc
  34. +++ squid-3.0.STABLE21/src/HttpHeaderTools.cc
  35. @@ -357,7 +357,7 @@ httpHeaderParseQuotedString (const char
  36. pos = start + 1;
  37. while (1) {
  38. - if (!(end = index (pos,'"'))) {
  39. + if (!(end = strchr (pos,'"'))) {
  40. debugs(66, 2, "failed to parse a quoted-string header field near '" << start << "'");
  41. return 0;
  42. }