[htdig3-dev] Summary and patch for robots.txt


Subject: [htdig3-dev] Summary and patch for robots.txt
From: Valdas Andrulis (valdand@soften.ktu.lt)
Date: Tue Feb 08 2000 - 11:55:12 PST


Hi again,

As Gilles Detillieux said in previous letter if we follow the draft then
the fix is:

                if (!seen_mynme)
                {
                    seen_myname = 1;
                    pay_attention = 1;
                    pattern = 0;
                }
                else
                    pay_attention = 0;

To allow several intermixed entries there is path:

--- htdig/Server.cc.old Tue Feb 8 20:24:53 2000
+++ htdig/Server.cc Tue Feb 8 20:25:48 2000
@@ -213,9 +213,10 @@
                // This is for us! This will override any previous
patterns
                // that may have been set.
                //
+ if (!seen_myname)
+ pattern = 0;
                seen_myname = 1;
                pay_attention = 1;
- pattern = 0;
            }
            else
            {
----------
And even this doesn't fix the bug i described, initially i have only one
disallow entr, and it didn't pay attention either.

So there is the fix(i thinks this code was thought this way, common
error with if else):

--- htlib/HtRegex.cc.old Tue Feb 8 21:31:40 2000
+++ htlib/HtRegex.cc Tue Feb 8 21:32:21 2000
@@ -39,11 +39,15 @@
        if (str == NULL) return;
        if (strlen(str) <= 0) return;
        if (!case_sensitive)
+ {
          if (regcomp(&re, str, REG_EXTENDED|REG_ICASE) == 0)
                compiled = 1;
+ }
        else
+ {
          if (regcomp(&re, str, REG_EXTENDED) == 0)
                compiled = 1;
+ }
 }

 void

---------

After these patches urls are rejected correctly.

Bye

VAldas

------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
htdig3-dev-unsubscribe@htdig.org
You will receive a message to confirm this.



This archive was generated by hypermail 2b28 : Tue Feb 08 2000 - 11:58:17 PST