diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2008-08-11 21:31:09 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2008-08-11 21:31:09 (GMT) |
commit | 9bf7aefef2826d2275a85e56b6e49d9af59fc2a6 (patch) | |
tree | 8085cbe1fe85f3282aceb3b36d9c4d140a9325ce | |
parent | ab3517ae4d6cb7db7cd132fb1c502b9a82794859 (diff) | |
download | tcl-9bf7aefef2826d2275a85e56b6e49d9af59fc2a6.zip tcl-9bf7aefef2826d2275a85e56b6e49d9af59fc2a6.tar.gz tcl-9bf7aefef2826d2275a85e56b6e49d9af59fc2a6.tar.bz2 |
Remove the 8.5+ requirement to avoid problems with shipping http as a tcl module.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | library/http/http.tcl | 8 |
2 files changed, 8 insertions, 4 deletions
@@ -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 261a331..d5b299d 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.67.2.2 2008/08/11 15:49:26 dgp Exp $ +# RCS: @(#) $Id: http.tcl,v 1.67.2.3 2008/08/11 21:31:11 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 |