summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2008-08-11 21:29:45 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2008-08-11 21:29:45 (GMT)
commita069279c8c46c16594f83200022a91c434a74e64 (patch)
treedd437f7a7083db976ea5296aa872a6e2f72ab4b0
parent1a86c2e86267a3ddb6c0543e27e524eabff94442 (diff)
downloadtcl-a069279c8c46c16594f83200022a91c434a74e64.zip
tcl-a069279c8c46c16594f83200022a91c434a74e64.tar.gz
tcl-a069279c8c46c16594f83200022a91c434a74e64.tar.bz2
Remove the 8.5+ requirement to avoid problems with shipping http as a tcl module.
-rw-r--r--ChangeLog4
-rw-r--r--library/http/http.tcl8
2 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index d7656fa..f8f570a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-08-11 Pat Thoyts <patthoyts@users.sourceforge.net>
+
+ * library/http/http.tcl: Remove 8.5 requirement.
+
2008-08-11 Andreas Kupries <andreask@activestate.com>
* library/tm.tcl: Added a 'package provide' command to the
diff --git a/library/http/http.tcl b/library/http/http.tcl
index cd12953..ef0817c 100644
--- a/library/http/http.tcl
+++ b/library/http/http.tcl
@@ -8,7 +8,7 @@
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: http.tcl,v 1.69 2008/08/11 15:59:51 dgp Exp $
+# RCS: @(#) $Id: http.tcl,v 1.70 2008/08/11 21:29:47 patthoyts Exp $
package require Tcl 8.5.0
# Keep this in sync with pkgIndex.tcl and with the install directories
@@ -1406,10 +1406,10 @@ proc http::Gunzip {data} {
incr pos
}
- binary scan [string range $data end-7 end] iuiu crc size
+ binary scan [string range $data end-7 end] ii crc size
set inflated [zlib inflate [string range $data $pos end-8]]
-
- if { $crc != [set chk [zlib crc32 $inflated]] } {
+ set chk [zlib crc32 $inflated]
+ if { ($crc & 0xffffffff) != ($chk & 0xffffffff)} {
return -code error "invalid data: checksum mismatch $crc != $chk"
}
return $inflated