diff -ruN squid-2.5.STABLE10-RC2/configure squid-2.5.STABLE10-RC3/configure
--- squid-2.5.STABLE10-RC2/configure	Tue May 10 17:20:49 2005
+++ squid-2.5.STABLE10-RC3/configure	Wed May 11 08:42:32 2005
@@ -1022,7 +1022,7 @@
 
 # Define the identity of the package.
 PACKAGE=squid
-VERSION=2.5.STABLE10-RC2
+VERSION=2.5.STABLE10-RC3
 cat >> confdefs.h <<EOF
 #define PACKAGE "$PACKAGE"
 EOF
@@ -1073,7 +1073,7 @@
 
   
 
-# From configure.in Revision: 1.251.2.90 
+# From configure.in Revision: 1.251.2.91 
 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
 echo "configure:1079: checking whether to enable maintainer-specific portions of Makefiles" >&5
     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
diff -ruN squid-2.5.STABLE10-RC2/configure.in squid-2.5.STABLE10-RC3/configure.in
--- squid-2.5.STABLE10-RC2/configure.in	Tue May 10 17:20:49 2005
+++ squid-2.5.STABLE10-RC3/configure.in	Wed May 11 08:42:32 2005
@@ -3,15 +3,15 @@
 dnl
 dnl  Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
 dnl
-dnl  $Id: configure.in,v 1.251.2.90 2005/05/10 23:14:48 hno Exp $
+dnl  $Id: configure.in,v 1.251.2.91 2005/05/11 13:32:47 hno Exp $
 dnl
 dnl
 dnl
 AC_INIT(src/main.c)
 AC_CONFIG_AUX_DIR(cfgaux)
-AM_INIT_AUTOMAKE(squid, 2.5.STABLE10-RC2)
+AM_INIT_AUTOMAKE(squid, 2.5.STABLE10-RC3)
 AM_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.251.2.90 $)dnl
+AC_REVISION($Revision: 1.251.2.91 $)dnl
 AC_PREFIX_DEFAULT(/usr/local/squid)
 AM_MAINTAINER_MODE
 
diff -ruN squid-2.5.STABLE10-RC2/include/version.h squid-2.5.STABLE10-RC3/include/version.h
--- squid-2.5.STABLE10-RC2/include/version.h	Tue May 10 17:20:49 2005
+++ squid-2.5.STABLE10-RC3/include/version.h	Wed May 11 08:42:32 2005
@@ -9,5 +9,5 @@
  */
 
 #ifndef SQUID_RELEASE_TIME
-#define SQUID_RELEASE_TIME 1115767245
+#define SQUID_RELEASE_TIME 1115822549
 #endif
diff -ruN squid-2.5.STABLE10-RC2/lib/rfc1035.c squid-2.5.STABLE10-RC3/lib/rfc1035.c
--- squid-2.5.STABLE10-RC2/lib/rfc1035.c	Tue May 10 05:48:21 2005
+++ squid-2.5.STABLE10-RC3/lib/rfc1035.c	Wed May 11 08:24:28 2005
@@ -1,6 +1,6 @@
 
 /*
- * $Id: rfc1035.c,v 1.22.2.9 2005/05/10 11:48:21 hno Exp $
+ * $Id: rfc1035.c,v 1.22.2.11 2005/05/11 14:24:28 hno Exp $
  *
  * Low level DNS protocol routines
  * AUTHOR: Duane Wessels
@@ -523,11 +523,24 @@
 int
 rfc1035QueryCompare(const rfc1035_query * a, const rfc1035_query * b)
 {
+    size_t la, lb;
     if (a->qtype != b->qtype)
 	return 1;
     if (a->qclass != b->qclass)
 	return 1;
-    return strcmp(a->name, b->name);
+    la = strlen(a->name);
+    lb = strlen(b->name);
+    if (la != lb) {
+	/* Trim root label(s) */
+	while (la > 0 && a->name[la - 1] == '.')
+	    la--;
+	while (lb > 0 && b->name[lb - 1] == '.')
+	    lb--;
+    }
+    if (la != lb)
+	return 1;
+
+    return strncasecmp(a->name, b->name, la);
 }
 
 /*
@@ -561,12 +574,6 @@
     }
     rfc1035_errno = 0;
     rfc1035_error_message = NULL;
-    if (msg->rcode) {
-	RFC1035_UNPACK_DEBUG;
-	rfc1035SetErrno((int) msg->rcode);
-	xfree(msg);
-	return -rfc1035_errno;
-    }
     i = (int) msg->qdcount;
     if (i != 1) {
 	/* This can not be an answer to our queries.. */
@@ -585,6 +592,11 @@
 	}
     }
     *answer = msg;
+    if (msg->rcode) {
+	RFC1035_UNPACK_DEBUG;
+	rfc1035SetErrno((int) msg->rcode);
+	return -rfc1035_errno;
+    }
     if (msg->ancount == 0)
 	return 0;
     recs = msg->answer = xcalloc((int) msg->ancount, sizeof(*recs));
