~grubng-dev/grubng/tools-urlsdb

« back to all changes in this revision

Viewing changes to Main.cs

  • Committer: thindil
  • Date: 2011-06-04 19:21:57 UTC
  • Revision ID: thindil2@gmail.com-20110604192157-kdctvzc7md53ees0
add If-Modified-Since header only for pages with HTTP answer code 200

Show diffs side-by-side

added added

removed removed

Lines of Context:
318
318
                                foreach (string url in urlsArray)
319
319
                                {
320
320
                                        urlparts = url.Split(new char[] {' '});
321
 
                                        if (urlparts.Length != 2)
 
321
                                        if (urlparts.Length != 3)
322
322
                                        {
323
323
                                                continue;
324
324
                                        }
336
336
                                        writer.Write("Host: " + host + "\r\n");
337
337
                                        writer.Write("User-Agent: " + useragent + "\r\n");
338
338
                                        writer.Write("Accept: " + accept +"\r\n");
339
 
                                        if (urlparts[1] != "0")
 
339
                                        if ((urlparts[1] != "0") && (urlparts[2] == "200"))
340
340
                                        {
341
341
                                                modtime = new DateTime(Convert.ToInt32(urlparts[1].Substring(0, 4)), 
342
342
                                                                       Convert.ToInt32(urlparts[1].Substring(4, 2)),