diff src/scanner.cpp @ 44:6b79046b18c2

changes for 3.2
author carl
date Fri, 09 Jul 2004 07:53:02 -0700
parents afcf403709ef
children 05957b18b2e6
line wrap: on
line diff
--- a/src/scanner.cpp	Mon Jul 05 22:24:22 2004 -0700
+++ b/src/scanner.cpp	Fri Jul 09 07:53:02 2004 -0700
@@ -959,7 +959,7 @@
                     char *p2 = strrchr((const char *)pending, '.');
                     if (p1 && (p1 != p2)) {
                         // have two periods, so three components
-                        for (int i=1; i<count; i++) pending[i] = tolower(pending[i]);
+                        for (int i=0; i<count; i++) pending[i] = tolower(pending[i]);
                         // is last component a tld?
                         string_set::iterator i = memory->tlds->find(p2+1);
                         if (i != memory->tlds->end()) memory->new_url((char*)pending);
@@ -1013,7 +1013,11 @@
                     if (p              &&                                       // have a leading /
                         strchr(p, '.') &&                                       // require at least one . in a dns name
                         (strncasecmp((const char *)pending, "http", 4) == 0)) { // must start with protocol
-                        memory->new_url(++p);                           // we seem to have a host name, skip the last /
+                        // we seem to have a host name
+                        p++;                    // skip the last /
+                        int c = strlen(p);
+                        for (int i=0; i<c; i++) p[i] = tolower(p[i]);
+                        memory->new_url(p);     // record it
                     }
                 }
                 st = u_init;