--- docshell/base/nsWebShell.cpp.orig 2006-01-24 21:46:02.000000000 -0500 +++ docshell/base/nsWebShell.cpp 2006-01-24 23:17:35.000000000 -0500 @@ -99,6 +99,7 @@ #include "nsIFocusController.h" #include "nsGUIEvent.h" #include "nsISHistoryInternal.h" +#include "nsCheapSets.h" #include "nsIHttpChannel.h" #include "nsIHttpChannelInternal.h" @@ -327,6 +328,11 @@ const PRUnichar *start = value.BeginReading(); const PRUnichar *end = value.EndReading(); const PRUnichar *iter = start; + + nsStringHashSet *uriHash = new nsStringHashSet(); + NS_ASSERTION(uriHash, "Out of memory"); + uriHash->Init(10); + for (;;) { if (iter < end && *iter != ' ') { ++iter; @@ -334,12 +340,17 @@ while (*start == ' ' && start < iter) ++start; if (iter != start) - SendPing(Substring(start, iter), doc, referrer, ios); + if (!uriHash->Contains(Substring(start, iter))) { + SendPing(Substring(start, iter), doc, referrer, ios); + uriHash->Put(Substring(start, iter)); + } start = iter = iter + 1; if (iter >= end) break; } } + + delete uriHash; } //----------------------------------------------------------------------