Re: Bugs in htdig-3.0.8b2


Alexander Yu. Zotov (sandy@agmar.ru)
Tue, 12 May 1998 11:20:02 +0400 (MSD)


Andrew Scherpbier writes:
>
>I appreciate your help in finding and fixing these bugs!
>Can you send me patches that I can apply to the sources? (use "diff -c" or
>"diff -u" to create the patches)
>Thanks!

I have done "diff -c".
Output is below.

--
Alexander Zotov,
 webmaster of http://www.agmar.ru

---cut here---

*** htlib/String.old Fri Aug 15 09:59:38 1997 --- htlib/String.cc Tue May 12 10:50:11 1998 *************** *** 254,259 **** --- 254,265 ---- { int len = strlen(str); int i; + + // Set the first char after string end to zero + // to prevent finding substrings including symbols + // after actual end of string + Data[Length] = '\0'; + for (i = 0; i < Length; i++) { if (strncmp(&Data[i], str, len) == 0) *** htdig/HTML.old Fri Aug 15 09:59:26 1997 --- htdig/HTML.cc Tue May 12 11:05:24 1998 *************** *** 192,198 **** --- 192,212 ---- { unsigned char ch; ch = SGMLEntities::translateAndUpdate(position); + + // Quick workaround to avoid sticking of &nbsp; and &quot; + // (converted to space and quote) to extracted words + // I am going to check all possible cases (&copy;, etc) + // later and may be rewrite this 'if' + // + if (isalnum(ch) || strchr(valid_punctuation, ch) || + ch >= 160) word << (char) ch; + else + { + position--; + position[0] = ch; + break; + } } else { *** htlib/Configuration.old Fri Aug 15 09:59:34 1997 --- htlib/Configuration.cc Tue May 12 11:13:15 1998 *************** *** 155,160 **** --- 155,165 ---- if (mystrcasecmp(name, "locale") == 0) { setlocale(LC_ALL, value); + + // Set time format to standard to avoid sending + // If-Modified-Since http headers in native format + // which http servers can't understand + setlocale(LC_TIME, ""); } }



This archive was generated by hypermail 2.0b3 on Sat Jan 02 1999 - 16:26:16 PST