ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/proj/trunk/Search/Indexer.cpp
(Generate patch)

Comparing trunk/Search/Indexer.cpp (file contents):
Revision 16 by douglas, 2002-12-07T00:19:03-08:00 vs.
Revision 17 by douglas, 2002-12-09T18:31:11-08:00

# Line 89 | Line 89 | void Indexer::index(URL& url, ofstream&
89  
90                  if (!restricted(url))
91                  {
92 <                        if (http.handle(url))
92 >                        if (http.handle(url, true))
93                          {
94 <                                if (http.good())
94 >                                if (http.contentType().find("text/plain") == 0 ||
95 >                                        http.contentType().find("text/html") == 0)
96                                  {
97 +                                        http.clear();
98 +                                        if (!http.handle(url)) exit(1);
99 +                                        
100                                          cout << "Indexing " << url << "..." << flush;
101  
102                                          if (processor.process(http, url))
# Line 120 | Line 124 | void Indexer::index(URL& url, ofstream&
124                                                  }
125                                          }
126                                  }
127 +                                else
128 +                                {
129 +                                        // unhandled content
130 +                                }
131 +                        }
132 +                        else if (http.redirect() != "")
133 +                        {
134 +                                if (pages.find(http.redirect()) == pages.end())
135 +                                {
136 +                                        links.push(URL(http.redirect()));
137 +                                }
138                          }
139  
140                          http.clear();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines