summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgerv%gerv.net <>2008-07-07 22:07:23 +0200
committergerv%gerv.net <>2008-07-07 22:07:23 +0200
commit19cb881523a402a9c5feea49d84f991e7d2dc76c (patch)
treeb5ea00d079f09028b121188a2ef35b0ecabc2592
parent0b699b7ba2f8514728029965149bacc3a54bb9e3 (diff)
downloadbugzilla-19cb881523a402a9c5feea49d84f991e7d2dc76c.tar.gz
bugzilla-19cb881523a402a9c5feea49d84f991e7d2dc76c.tar.xz
Bug 441496 - Use server push (multipart/x-mixed-replace) with compatible versions of Safari. Patch by gerv; r,a=LpSolit.
-rwxr-xr-xbuglist.cgi11
1 files changed, 7 insertions, 4 deletions
diff --git a/buglist.cgi b/buglist.cgi
index 2d4e323b2..86147869b 100755
--- a/buglist.cgi
+++ b/buglist.cgi
@@ -137,17 +137,20 @@ my $format = $template->get_format("list/list", scalar $cgi->param('format'),
# to the URL.
#
# Server push is a Netscape 3+ hack incompatible with MSIE, Lynx, and others.
-# Even Communicator 4.51 has bugs with it, especially during page reload.
-# http://www.browsercaps.org used as source of compatible browsers.
-# Safari (WebKit) does not support it, despite a UA that says otherwise (bug 188712)
+# Safari 2.0.2 (Webkit 416.11) and above support it.
# MSIE 5+ supports it on Mac (but not on Windows) (bug 190370)
#
+my $webkitversion = "";
+if ($ENV{'HTTP_USER_AGENT'} =~ /WebKit\/(\d+)/) {
+ $webkitversion = $1;
+}
+
my $serverpush =
$format->{'extension'} eq "html"
&& exists $ENV{'HTTP_USER_AGENT'}
&& $ENV{'HTTP_USER_AGENT'} =~ /Mozilla.[3-9]/
&& (($ENV{'HTTP_USER_AGENT'} !~ /[Cc]ompatible/) || ($ENV{'HTTP_USER_AGENT'} =~ /MSIE 5.*Mac_PowerPC/))
- && $ENV{'HTTP_USER_AGENT'} !~ /WebKit/
+ && (!$webkitversion || $webkitversion >= 416)
&& !$agent
&& !defined($cgi->param('serverpush'))
|| $cgi->param('serverpush');