diff -u -r -N squid-3.2.8/ChangeLog squid-3.2.9/ChangeLog
--- squid-3.2.8/ChangeLog	2013-03-02 14:46:03.000000000 +1300
+++ squid-3.2.9/ChangeLog	2013-03-12 23:15:58.000000000 +1300
@@ -1,3 +1,10 @@
+Changes to squid-3.2.9 (12 Mar 2013):
+
+	- Regression fix: Accept-Language header parse
+	- Bug 3673: Silence 'Failed to select source' messages
+	- Fix authentication headers sent on peer digest requests
+	- Fix build error on Solaris, OpenIndiana, Omnios
+
 Changes to squid-3.2.8 (02 Mar 2013):
 
 	- Bug 3767: tcp_outgoing_tos/mark ACLs do not obey acl_uses_indirect_client
diff -u -r -N squid-3.2.8/configure squid-3.2.9/configure
--- squid-3.2.8/configure	2013-03-02 14:47:21.000000000 +1300
+++ squid-3.2.9/configure	2013-03-12 23:17:19.000000000 +1300
@@ -1,7 +1,7 @@
 #! /bin/sh
 # From configure.ac Revision.
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for Squid Web Proxy 3.2.8.
+# Generated by GNU Autoconf 2.68 for Squid Web Proxy 3.2.9.
 #
 # Report bugs to <http://bugs.squid-cache.org/>.
 #
@@ -575,8 +575,8 @@
 # Identity of this package.
 PACKAGE_NAME='Squid Web Proxy'
 PACKAGE_TARNAME='squid'
-PACKAGE_VERSION='3.2.8'
-PACKAGE_STRING='Squid Web Proxy 3.2.8'
+PACKAGE_VERSION='3.2.9'
+PACKAGE_STRING='Squid Web Proxy 3.2.9'
 PACKAGE_BUGREPORT='http://bugs.squid-cache.org/'
 PACKAGE_URL=''
 
@@ -1571,7 +1571,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures Squid Web Proxy 3.2.8 to adapt to many kinds of systems.
+\`configure' configures Squid Web Proxy 3.2.9 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1641,7 +1641,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of Squid Web Proxy 3.2.8:";;
+     short | recursive ) echo "Configuration of Squid Web Proxy 3.2.9:";;
    esac
   cat <<\_ACEOF
 
@@ -2019,7 +2019,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-Squid Web Proxy configure 3.2.8
+Squid Web Proxy configure 3.2.9
 generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -3115,7 +3115,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by Squid Web Proxy $as_me 3.2.8, which was
+It was created by Squid Web Proxy $as_me 3.2.9, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
@@ -3934,7 +3934,7 @@
 
 # Define the identity of the package.
  PACKAGE='squid'
- VERSION='3.2.8'
+ VERSION='3.2.9'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -30894,7 +30894,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by Squid Web Proxy $as_me 3.2.8, which was
+This file was extended by Squid Web Proxy $as_me 3.2.9, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -30960,7 +30960,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-Squid Web Proxy config.status 3.2.8
+Squid Web Proxy config.status 3.2.9
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
diff -u -r -N squid-3.2.8/configure.ac squid-3.2.9/configure.ac
--- squid-3.2.8/configure.ac	2013-03-02 14:47:21.000000000 +1300
+++ squid-3.2.9/configure.ac	2013-03-12 23:17:18.000000000 +1300
@@ -1,4 +1,4 @@
-AC_INIT([Squid Web Proxy],[3.2.8],[http://bugs.squid-cache.org/],[squid])
+AC_INIT([Squid Web Proxy],[3.2.9],[http://bugs.squid-cache.org/],[squid])
 AC_PREREQ(2.61)
 AC_CONFIG_HEADERS([include/autoconf.h])
 AC_CONFIG_AUX_DIR(cfgaux)
diff -u -r -N squid-3.2.8/helpers/basic_auth/DB/basic_db_auth.8 squid-3.2.9/helpers/basic_auth/DB/basic_db_auth.8
--- squid-3.2.8/helpers/basic_auth/DB/basic_db_auth.8	2013-03-02 15:07:58.000000000 +1300
+++ squid-3.2.9/helpers/basic_auth/DB/basic_db_auth.8	2013-03-12 23:46:22.000000000 +1300
@@ -124,7 +124,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BASIC_DB_AUTH 1"
-.TH BASIC_DB_AUTH 1 "2013-03-01" "perl v5.10.1" "User Contributed Perl Documentation"
+.TH BASIC_DB_AUTH 1 "2013-03-12" "perl v5.10.1" "User Contributed Perl Documentation"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff -u -r -N squid-3.2.8/helpers/external_acl/wbinfo_group/ext_wbinfo_group_acl.8 squid-3.2.9/helpers/external_acl/wbinfo_group/ext_wbinfo_group_acl.8
--- squid-3.2.8/helpers/external_acl/wbinfo_group/ext_wbinfo_group_acl.8	2013-03-02 15:08:02.000000000 +1300
+++ squid-3.2.9/helpers/external_acl/wbinfo_group/ext_wbinfo_group_acl.8	2013-03-12 23:46:35.000000000 +1300
@@ -124,7 +124,7 @@
 .\" ========================================================================
 .\"
 .IX Title "EXT_WBINFO_GROUP_ACL.PL.IN 1"
-.TH EXT_WBINFO_GROUP_ACL.PL.IN 1 "2013-03-01" "perl v5.10.1" "User Contributed Perl Documentation"
+.TH EXT_WBINFO_GROUP_ACL.PL.IN 1 "2013-03-12" "perl v5.10.1" "User Contributed Perl Documentation"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff -u -r -N squid-3.2.8/include/version.h squid-3.2.9/include/version.h
--- squid-3.2.8/include/version.h	2013-03-02 14:47:21.000000000 +1300
+++ squid-3.2.9/include/version.h	2013-03-12 23:17:19.000000000 +1300
@@ -9,7 +9,7 @@
  */
 
 #ifndef SQUID_RELEASE_TIME
-#define SQUID_RELEASE_TIME 1362188760
+#define SQUID_RELEASE_TIME 1363083354
 #endif
 
 #ifndef APP_SHORTNAME
diff -u -r -N squid-3.2.8/RELEASENOTES.html squid-3.2.9/RELEASENOTES.html
--- squid-3.2.8/RELEASENOTES.html	2013-03-02 15:08:19.000000000 +1300
+++ squid-3.2.9/RELEASENOTES.html	2013-03-12 23:47:23.000000000 +1300
@@ -2,10 +2,10 @@
 <HTML>
 <HEAD>
  <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.66">
- <TITLE>Squid 3.2.7 release notes</TITLE>
+ <TITLE>Squid 3.2.9 release notes</TITLE>
 </HEAD>
 <BODY>
-<H1>Squid 3.2.7 release notes</H1>
+<H1>Squid 3.2.9 release notes</H1>
 
 <H2>Squid Developers</H2>
 <HR>
@@ -72,12 +72,14 @@
 <HR>
 <H2><A NAME="s1">1.</A> <A HREF="#toc1">Notice</A></H2>
 
-<P>The Squid Team are pleased to announce the release of Squid-3.2.7 for 
-testing.</P>
+<P>The Squid Team are pleased to announce the release of Squid-3.2.9.</P>
 <P>This new release is available for download from 
-<A HREF="http://www.squid-cache.org/Versions/v3/3.2/">http://www.squid-cache.org/Versions/v3/3.2/</A> or the 
+<A HREF="http://www.squid-cache.org/Versions/v3/3.2/">http://www.squid-cache.org/Versions/v3/3.2/</A> or the
 <A HREF="http://www.squid-cache.org/Mirrors/http-mirrors.html">mirrors</A>.</P>
-<P>While this release is not deemed ready for production use, we believe it is ready for wider testing by the community.</P>
+
+<P>A large number of the show-stopper bugs have been fixed along with general improvements to the IPv6 support.
+While this release is not fully bug-free we believe it is ready for use in production on many systems.</P>
+
 <P>We welcome feedback and bug reports. If you find a bug, please see 
 <A HREF="http://wiki.squid-cache.org/SquidFaq/BugReporting">http://wiki.squid-cache.org/SquidFaq/BugReporting</A> for how to submit a 
 report with a stack trace.</P>
@@ -86,7 +88,7 @@
 </H2>
 
 <P>Although this release is deemed good enough for use in many setups, please note the existence of 
-<A HREF="http://bugs.squid-cache.org/buglist.cgi?query_format=advanced&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;target_milestone=3.2&amp;long_desc_type=allwordssubstr&amp;long_desc=&amp;bug_file_loc_type=allwordssubstr&amp;bug_file_loc=&amp;status_whiteboard_type=allwordssubstr&amp;status_whiteboard=&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;emailtype1=substring&amp;email1=&amp;emailtype2=substring&amp;email2=&amp;bugidtype=include&amp;bug_id=&amp;votes=&amp;chfieldfrom=&amp;chfieldto=Now&amp;chfieldvalue=&amp;cmdtype=doit&amp;order=bugs.bug_severity&amp;field0-0-0=noop&amp;type0-0-0=noop&amp;value0-0-0=">open bugs against Squid-3.2</A>.</P>
+<A HREF="http://bugs.squid-cache.org/buglist.cgi?query_format=advanced&amp;product=Squid&amp;bug_status=UNCONFIRMED&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;version=3.2">open bugs against Squid-3.2</A>.</P>
 
 <P>Some issues to note as currently known in this release which are not able to be fixed in the 3.2 series are:</P>
 <P>
@@ -160,7 +162,7 @@
 DNS lookups to locate alternative DIRECT destinations will not be done.</P>
 
 <P>Known Issue: When non-strict validation fails Squid will relay the request, but can only do
-so safely to the orginal destination IP the client was contacting. The client original
+so safely to the original destination IP the client was contacting. The client original
 destination IP is lost when relaying to peers in a hierarchy. This means the upstream peers
 are still at risk of causing same-origin bypass CVE-2009-0801 vulnerability.
 Developer time is required to implement safe transit of these requests.
@@ -253,7 +255,7 @@
 path and parameters as its own command parameters. The <EM>concurrency</EM> setting already
 existing in Squid is used to configure how many child helpers it may run.</P>
 
-<P>For example, a traditional configration is
+<P>For example, a traditional configuration is
 <PRE>
         url_rewrite_program /your/redirector.sh
         url_rewrite_children 5
@@ -289,10 +291,10 @@
 <P>The on-demand helpers feature allows greater flexibility and resolves this problem by allowing
 maximum, initial and idle thresholds to be configured. Squid will start the initial set during
 start and reconfigure phases. However over the operational use new helpers up to the maxium will
-be started as load demands. The idle threshold determins how many more helpers to start if the
+be started as load demands. The idle threshold determines how many more helpers to start if the
 currently running set is not enough to handle current request loads.</P>
 
-<P>For example, a traditional configration is
+<P>For example, a traditional configuration is
 <PRE>
         auth_param ntlm /usr/libexec/squid/ntlm_auth
         auth_param ntlm children 200
@@ -357,7 +359,7 @@
 <P>
 <UL>
 <LI>mswin_check_ad_group - ext_ad_group_acl - Check logged in users Group membership using Active Directory.</LI>
-<LI>ip_user_check - ext_file_userip_acl - Restrict users to cetain IP addresses, using a text file backend.</LI>
+<LI>ip_user_check - ext_file_userip_acl - Restrict users to certain IP addresses, using a text file backend.</LI>
 <LI>squid_kerb_ldap - ext_kerberos_ldap_group_acl - Check logged in Kerberos or NTLM users Group membership using LDAP.</LI>
 <LI>squid_ldap_group - ext_ldap_group_acl - Check logged in users Group membership using LDAP.</LI>
 <LI>mswin_check_lm_group - ext_lm_group_acl - Check logged in users Group membership using LanManager.</LI>
@@ -416,8 +418,8 @@
 
 <P>Automatic detection and use of the pthreads library available from Solaris 10</P>
 
-<P>The result of this addition means that faster more efficient AUFS cache storage mechanisims
-are now available in Solaris 10.</P>
+<P>The result of this addition means that faster more efficient AUFS cache storage mechanism
+is now available in Solaris 10.</P>
 
 <P>Support is experimental at this stage due to lack of feedback on the results of enabling it.
 We recommend giving AUFS a try for faster disk storage and encourage feedback.</P>
@@ -431,14 +433,14 @@
 feature support in Squid. This release opens Surrogate support to all reverse proxies.</P>
 
 <P>Reverse proxy requests sent on to the web server include the HTTP header <EM>Surrogate-Capabilities:</EM>
-specifying the capabilities of the reverse proxy along with an ID which can be used to target reponses with
+specifying the capabilities of the reverse proxy along with an ID which can be used to target responses with
 a <EM>Surrogate-Control:</EM> HTTP header used instead of the <EM>Cache-Control:</EM> header.</P>
 
 <P>The default surrogate ID is generated automatically from the Squid site-unique hostname as found by the
 automatic detection or manual configuration of <EM>visible_hostname</EM> although can be configured
 separately with the <EM>httpd_accel_surrogate_id</EM> option.</P>
 
-<P><EM>Security Considerations:</EM> Websites sould be careful of accepting any surrogate ID.
+<P><EM>Security Considerations:</EM> Websites should be careful of accepting any surrogate ID.
 Older releases of Squid leak the Surrogate-Control headers to external servers.
 This 3.2 series of Squid will now prevent this leakage of its own ID destined responses, however it is possible
 and for some uses desirable to receive external reverse-proxies <EM>Surrogate-Capabilities:</EM> headers.</P>
@@ -553,7 +555,7 @@
 <UL>
 <LI>should contain a complete HTML page, with optional client-side scripting.</LI>
 <LI>must not contain server-side scripting. </LI>
-<LI>will have macro substitution performed on it using the same macros as used by the error page tempates.</LI>
+<LI>will have macro substitution performed on it using the same macros as used by the error page templates.</LI>
 </UL>
 </P>
 
@@ -588,32 +590,32 @@
 headers or eCAP options to Squid ICAP requests or eCAP transactions.</P>
 
 <DT><B>adaptation_send_client_ip</B><DD>
-<P>Same as depricated icap_send_client_ip
+<P>Same as deprecated icap_send_client_ip
 but applies to both ICAP and eCAP.</P>
 
 <DT><B>adaptation_send_username</B><DD>
-<P>Same as depricated icap_send_client_username
+<P>Same as deprecated icap_send_client_username
 but applies to both ICAP and eCAP.</P>
 
 <DT><B>adaptation_uses_indirect_client</B><DD>
-<P>Same as depricated icap_uses_indirect_client
+<P>Same as deprecated icap_uses_indirect_client
 but applies to both ICAP and eCAP.</P>
 
 <DT><B>client_delay_pools</B><DD>
-<P>New setting for client bandwith limits to specifies the number 
+<P>New setting for client bandwidth limits to specifies the number 
 of client delay pools used.</P>
 
 <DT><B>client_delay_initial_bucket_level</B><DD>
-<P>New setting for client bandwith limits to determine the initial 
+<P>New setting for client bandwidth limits to determine the initial 
 bucket size as a percentage of  max_bucket_size from 
 client_delay_parameters.</P>
 
 <DT><B>client_delay_parameters</B><DD>
-<P>New setting for client bandwith limits to configures client-side 
+<P>New setting for client bandwidth limits to configures client-side 
 bandwidth limits.</P>
 
 <DT><B>client_delay_access</B><DD>
-<P>New setting for client bandwith limits to determines the 
+<P>New setting for client bandwidth limits to determines the 
 client-side delay pool for the request.</P>
 
 <DT><B>client_dst_passthru</B><DD>
@@ -727,17 +729,12 @@
 New installs, or installs with no logs configured explicitly will use this module by default.</P>
 <P>New <EM>tcp</EM> module to send each log line as text data to a TCP receiver.</P>
 <P>New <EM>udp</EM> module to send each log line as text data to a UDP receiver.</P>
-<P>New format <EM>referrer</EM> to log with the format prevously used by referer_log directive.</P>
-<P>New format <EM>useragent</EM> to log with the format prevously used by useragent_log directive.</P>
+<P>New format <EM>referrer</EM> to log with the format previously used by referer_log directive.</P>
+<P>New format <EM>useragent</EM> to log with the format previously used by useragent_log directive.</P>
 
-<DT><B>acl : random, localip, localport</B><DD>
+<DT><B>acl : random, urllogin</B><DD>
 <P>New type <EM>random</EM>. Pseudo-randomly match requests based on a configured probability.</P>
-<P>Renamed <EM>myip</EM> to <EM>localip</EM>. It matches the IP which the client connected to.</P>
-<P>Renamed <EM>myport</EM> to <EM>localport</EM>. It matches the port which the client connected to.</P>
 <P>Ported <EM>urllogin</EM> option from Squid 2.7, to match a regex pattern on the URL login field (if any).</P>
-<P>The <EM>localip</EM>/<EM>localport</EM> differ from earlier releases where they matched a mix of
-of an invalid IP and port 0, the client destination IP/port or the Squid listening IP/port.
-This definition is now consistent across all modes of traffic received by Squid.</P>
 <P>The <EM>manager</EM> ACL requires adjustment to cover new cache manager access. So it has now been
 built-in as a predefined ACL name matching URLs equivalent to the following regular expression:
 <PRE>
@@ -749,7 +746,7 @@
 
 <DT><B>auth_param</B><DD>
 <P>New options for Basic, Digest, NTLM, Negotiate <EM>children</EM> settings.
-<EM>startup=N</EM> determins minimum number of helper processes used.
+<EM>startup=N</EM> determines minimum number of helper processes used.
 <EM>idle=N</EM> determines how many helper to retain as buffer against sudden traffic loads.
 <EM>concurrency=N</EM> previously called <EM>auth_param ... concurrency</EM> as a separate option.</P>
 <P>Removed Basic, Digest, NTLM, Negotiate <EM>auth_param ... concurrency</EM> setting option.</P>
@@ -783,8 +780,8 @@
 <P><EM>%SRCEUI64</EM> EUI-64 of clients with SLAAC address.</P>
 <P><EM>%EXT_LOG</EM> log= message returned by previous external ACL calls. An updated version may be returned.</P>
 <P><EM>%EXT_TAG</EM> tag= value returned by previous external ACL calls. Tag may not be altered once set.</P>
-<P><EM>children-max=N</EM> determins maximum number of helper processes used.</P>
-<P><EM>children-startup=N</EM> determins minimum number of helper processes used.</P>
+<P><EM>children-max=N</EM> determines maximum number of helper processes used.</P>
+<P><EM>children-startup=N</EM> determines minimum number of helper processes used.</P>
 <P><EM>children-idle=N</EM> determines how many helper to retain as buffer against sudden traffic loads.</P>
 <P>Deprecated <EM>children=N</EM> in favor of <EM>children-max=N</EM>.</P>
 
@@ -1024,16 +1021,16 @@
 <P>Replaced by --enable-eui</P>
 
 <DT><B>--enable-auth-basic-helpers</B><DD>
-<P>replaced by <EM>--enable-auth-basic</EM>.</P>
+<P>Replaced by <EM>--enable-auth-basic</EM>.</P>
 
 <DT><B>--enable-auth-digest-helpers</B><DD>
-<P>replaced by <EM>--enable-auth-digest</EM>.</P>
+<P>Replaced by <EM>--enable-auth-digest</EM>.</P>
 
 <DT><B>--enable-auth-negotiate-helpers</B><DD>
-<P>replaced by <EM>--enable-auth-negotiate</EM>.</P>
+<P>Replaced by <EM>--enable-auth-negotiate</EM>.</P>
 
 <DT><B>--enable-auth-ntlm-helpers</B><DD>
-<P>replaced by <EM>--enable-auth-ntlm</EM>.</P>
+<P>Replaced by <EM>--enable-auth-ntlm</EM>.</P>
 
 <DT><B>--enable-referer-log</B><DD>
 <P>Obsolete.</P>
@@ -1066,7 +1063,7 @@
 An external_acl_type helper may be used to bypass authentication if that is suitable.</P>
 
 <DT><B>cache_peer</B><DD>
-<P><EM>http11</EM> Obsolete.</P>
+<P>Option <EM>http11</EM> obsolete.</P>
 
 <DT><B>external_acl_type</B><DD>
 <P>Format tag <EM>%{Header}</EM> replaced by <EM>%>{Header}</EM></P>
@@ -1076,9 +1073,9 @@
 <P>Replaced by <EM>request_header_access</EM> and <EM>reply_header_access</EM></P>
 
 <DT><B>http_port</B><DD>
-<P><EM>no-connection-auth</EM> replaced by <EM>connection-auth=[on|off]</EM>. Default is ON.</P>
-<P><EM>transparent</EM> option replaced by <EM>intercept</EM></P>
-<P><EM>http11</EM> obsolete.</P>
+<P>Option <EM>no-connection-auth</EM> replaced by <EM>connection-auth=[on|off]</EM>. Default is ON.</P>
+<P>Option <EM>transparent</EM> option replaced by <EM>intercept</EM></P>
+<P>Option <EM>http11</EM> obsolete.</P>
 
 <DT><B>http_access2</B><DD>
 <P>Replaced by <EM>adapted_http_access</EM></P>
@@ -1095,6 +1092,12 @@
 <DT><B>server_http11</B><DD>
 <P>Obsolete.</P>
 
+<DT><B>update_headers</B><DD>
+<P>Obsolete. The experimental actions enabled in 2.7 by this option have been integrated as default
+actions for the <EM>rock</EM> storage type and memory caches.
+The configuration option is no longer necessary and has been dropped.
+NOTE: It is not yet supported by <EM>ufs</EM>, <EM>aufs</EM>, or <EM>diskd</EM> storage.</P>
+
 <DT><B>upgrade_http0.9</B><DD>
 <P>Obsolete.</P>
 
@@ -1275,9 +1278,6 @@
 <DT><B>storeurl_rewrite_program</B><DD>
 <P>Not yet ported from 2.7</P>
 
-<DT><B>update_headers</B><DD>
-<P>Not yet fully ported from 2.7. Memory and rock storage caches support this natively. UFS caches do not support it.</P>
-
 </DL>
 </P>
 </BODY>
diff -u -r -N squid-3.2.8/src/comm/ModDevPoll.cc squid-3.2.9/src/comm/ModDevPoll.cc
--- squid-3.2.8/src/comm/ModDevPoll.cc	2013-03-02 14:46:03.000000000 +1300
+++ squid-3.2.9/src/comm/ModDevPoll.cc	2013-03-12 23:15:58.000000000 +1300
@@ -67,10 +67,13 @@
 /* Solaris /dev/poll support, see "man -s 7D poll" */
 #include <sys/devpoll.h>
 #endif
+#if HAVE_LIMITS_H
+#include <limits.h>
+#endif
 
 #define DEBUG_DEVPOLL 0
 
-/* OPEN_MAX is defined in <limits.h>, presumably included by sys/devpoll.h */
+// OPEN_MAX is defined in <limits.h>
 #define	DEVPOLL_UPDATESIZE	OPEN_MAX
 #define	DEVPOLL_QUERYSIZE	OPEN_MAX
 
diff -u -r -N squid-3.2.8/src/errorpage.cc squid-3.2.9/src/errorpage.cc
--- squid-3.2.8/src/errorpage.cc	2013-03-02 14:46:03.000000000 +1300
+++ squid-3.2.9/src/errorpage.cc	2013-03-12 23:15:58.000000000 +1300
@@ -376,17 +376,9 @@
     while (pos < hdr.size()) {
         char *dt = lang;
 
-        if (!pos) {
-            /* skip any initial whitespace. */
-            while (pos < hdr.size() && xisspace(hdr[pos]))
-                ++pos;
-        } else {
-            // IFF we terminated the tag on whitespace or ';' we need to skip to the next ',' or end of header.
-            while (pos < hdr.size() && hdr[pos] != ',')
-                ++pos;
-            if (hdr[pos] == ',')
-                ++pos;
-        }
+        /* skip any initial whitespace. */
+        while (pos < hdr.size() && xisspace(hdr[pos]))
+            ++pos;
 
         /*
          * Header value format:
@@ -417,6 +409,13 @@
         *dt = '\0'; // nul-terminated the filename content string before system use.
         ++dt;
 
+        // if we terminated the tag on garbage or ';' we need to skip to the next ',' or end of header.
+        while (pos < hdr.size() && hdr[pos] != ',')
+            ++pos;
+
+        if (pos < hdr.size() && hdr[pos] == ',')
+            ++pos;
+
         debugs(4, 9, HERE << "STATE: dt='" << dt << "', lang='" << lang << "', pos=" << pos << ", buf='" << ((pos < hdr.size()) ? hdr.substr(pos,hdr.size()) : "") << "'");
 
         /* if we found anything we might use, try it. */
diff -u -r -N squid-3.2.8/src/errorpage.h squid-3.2.9/src/errorpage.h
--- squid-3.2.8/src/errorpage.h	2013-03-02 14:46:03.000000000 +1300
+++ squid-3.2.9/src/errorpage.h	2013-03-12 23:15:58.000000000 +1300
@@ -307,11 +307,16 @@
 /**
  * Parses the Accept-Language header value and return one language item on
  * each call.
+ * Will ignore any whitespace, q-values, and detectably invalid language
+ * codes in the header.
+ *
  * \param hdr is the Accept-Language header value
- * \param lang a buffer given by the user to store parsed language
+ * \param lang a buffer to store parsed language code in
  * \param langlen the length of the lang buffer
- * \param pos it is used to store the state of parsing. Must be "0" on first call
- * \return true on success, false otherwise
+ * \param pos is used to store the offset state of parsing. Must be "0" on first call.
+ *            Will be altered to point at the start of next field-value.
+ * \return true if something looking like a language token has been placed in lang, false otherwise
  */
 bool strHdrAcptLangGetItem(const String &hdr, char *lang, int langLen, size_t &pos);
+
 #endif /* SQUID_ERRORPAGE_H */
diff -u -r -N squid-3.2.8/src/peer_digest.cc squid-3.2.9/src/peer_digest.cc
--- squid-3.2.8/src/peer_digest.cc	2013-03-02 14:46:03.000000000 +1300
+++ squid-3.2.9/src/peer_digest.cc	2013-03-12 23:15:58.000000000 +1300
@@ -343,9 +343,14 @@
 
     req->header.putStr(HDR_ACCEPT, "text/html");
 
-    if (p->login)
+    if (p->login &&
+            p->login[0] != '*' &&
+            strcmp(p->login, "PASS") != 0 &&
+            strcmp(p->login, "PASSTHRU") != 0 &&
+            strcmp(p->login, "NEGOTIATE") != 0 &&
+            strcmp(p->login, "PROXYPASS") != 0) {
         xstrncpy(req->login, p->login, MAX_LOGIN_SZ);
-
+    }
     /* create fetch state structure */
     CBDATA_INIT_TYPE(DigestFetchState);
 
diff -u -r -N squid-3.2.8/src/peer_select.cc squid-3.2.9/src/peer_select.cc
--- squid-3.2.8/src/peer_select.cc	2013-03-02 14:46:03.000000000 +1300
+++ squid-3.2.9/src/peer_select.cc	2013-03-12 23:15:58.000000000 +1300
@@ -48,6 +48,7 @@
 #include "icmp/net_db.h"
 #include "ipcache.h"
 #include "ip/tools.h"
+#include "URL.h"
 
 static struct {
     int timeouts;
@@ -289,15 +290,10 @@
     PSC *callback = psstate->callback;
     psstate->callback = NULL;
 
-    if (psstate->paths->size() < 1) {
-        debugs(44, DBG_IMPORTANT, "Failed to select source for '" << psstate->entry->url() << "'");
-        debugs(44, DBG_IMPORTANT, "  always_direct = " << psstate->always_direct);
-        debugs(44, DBG_IMPORTANT, "   never_direct = " << psstate->never_direct);
-        debugs(44, DBG_IMPORTANT, "       timedout = " << psstate->ping.timedout);
-    } else {
-        debugs(44, 2, "Found sources for '" << psstate->entry->url() << "'");
-        debugs(44, 2, "  always_direct = " << psstate->always_direct);
-        debugs(44, 2, "   never_direct = " << psstate->never_direct);
+    debugs(44, 2, (psstate->paths->size()<1?"Failed to select source":"Found sources") << " for '" << psstate->url() << "'");
+    debugs(44, 2, "  always_direct = " << psstate->always_direct);
+    debugs(44, 2, "   never_direct = " << psstate->never_direct);
+    if (psstate->paths) {
         for (size_t i = 0; i < psstate->paths->size(); ++i) {
             if ((*psstate->paths)[i]->peerType == HIER_DIRECT)
                 debugs(44, 2, "         DIRECT = " << (*psstate->paths)[i]);
@@ -308,8 +304,8 @@
             else
                 debugs(44, 2, "     cache_peer = " << (*psstate->paths)[i]);
         }
-        debugs(44, 2, "       timedout = " << psstate->ping.timedout);
     }
+    debugs(44, 2, "       timedout = " << psstate->ping.timedout);
 
     psstate->ping.stop = current_time;
     psstate->request->hier.ping = psstate->ping;
@@ -977,6 +973,18 @@
     ; // no local defaults.
 }
 
+const char *
+ps_state::url() const
+{
+    if (entry)
+        return entry->url();
+
+    if (request)
+        return urlCanonical(request);
+
+    return "[no URL]";
+}
+
 ping_data::ping_data() :
         n_sent(0),
         n_recv(0),
diff -u -r -N squid-3.2.8/src/PeerSelectState.h squid-3.2.9/src/PeerSelectState.h
--- squid-3.2.8/src/PeerSelectState.h	2013-03-02 14:46:03.000000000 +1300
+++ squid-3.2.9/src/PeerSelectState.h	2013-03-12 23:15:58.000000000 +1300
@@ -73,6 +73,11 @@
 public:
     void *operator new(size_t);
     ps_state();
+
+    // Produce a URL for display identifying the transaction we are
+    // trying to locate a peer for.
+    const char * url() const;
+
     HttpRequest *request;
     StoreEntry *entry;
     allow_t always_direct;
diff -u -r -N squid-3.2.8/src/store_dir.cc squid-3.2.9/src/store_dir.cc
--- squid-3.2.8/src/store_dir.cc	2013-03-02 14:46:03.000000000 +1300
+++ squid-3.2.9/src/store_dir.cc	2013-03-12 23:15:58.000000000 +1300
@@ -52,6 +52,9 @@
 #if HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif
+#if HAVE_LIMITS_H
+#include <limits.h>
+#endif
 #if HAVE_SYS_MOUNT_H
 #include <sys/mount.h>
 #endif
