l people listed in "Ou
Deleted218950ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:08:31
OriginalBugID: 2971 Bug
Version: 8.2
SubmitDate: '1999-09-28'
LastModified: '1999-11-03'
Severity: LOW
Status: Released
Submitter: wart
ChangedBy: hershey
OS: All
FixedDate: '1999-11-03'
FixedInVersion: 8.2.1
ClosedDate: '2000-10-25'
In the following code, the files are downloaded in the order:
1, 257, 258, 259... 2-256 are skipped. This happens because
the http2.0 package uses the variable "i" in the namespace without
first declaring it. The result is that it finds a local variable
"i" and uses it instead, thus hosing the value that we wanted for "i".
set baseURL http://foo.bar.baz/
for {set i 1} {$i <= 500} {incr i} {
puts "Downloading page $i"
set token [http::geturl $baseURL$i.html]
set fileId [open $i.html w]
puts $fileId [http::code $token]
close $fileId
}
Fix: declare "variable i" in the http namespace before using it. Other
temporary variables should be checked to see that they won't potentially
hose user variable in the global scope.
--
This fix is already in the http 2.1 pkg for 8.2.1.
-- 09/28/1999 hobbs
welch Deleted ticket [218950ffff].
[History diff]2000-10-26 08:32:15
dgp Ticket [218950ffff]: 4 changes
[History diff]2001-04-19 03:34:09
Log in (anonymous is fine) to add a comment.