::http::geturl side-effects on 'i' variable
Deleted218875ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:07:03
OriginalBugID: 2502 Bug
Version: 8.0p2
SubmitDate: '1999-08-04'
LastModified: '1999-08-05'
Severity: MED
Status: Released
Submitter: techsupp
ChangedBy: hobbs
OS: Solaris
Machine: Other
FixedDate: '1999-08-05'
FixedInVersion: 8.2
ClosedDate: '2000-10-25'
Name:
José Serrano
Extensions:
none
CustomShell:
no
Comments:
There is obviously something wrong in the implementation of
::http::geturl that is changing the value of i in a part of the stack
that shouldn't be affected by it.
ReproducibleScript:
for {set i 0} {$i < $times} {incr i} {
puts "the value of i is : $i"
set val [::http::geturl http://dalwhinnie.dcs.st-and.ac.uk:81]
set ret [::http::data $val]
puts $ret
puts "new value : $i"
}
I called this script from the command line
dalwhinnie% ./test_query_http.tcl
ObservedBehavior:
The for loop is only executed once, because the 'i' variable gets
changed to the value 257 after the execution of ::http::geturl
Example:
dalwhinnie% ./test_query_http.tcl
the value of i is : 0
<HTML>
<HEAD>
...
</HEAD>
<BODY BGCOLOR="#ffffff" TEXT="#0a197a" LINK="#0a197a" VLINK="#0a197a"
ALINK=
"#0a197a">
...
</BODY>
</HTML>
new value : 257
DesiredBehavior:
Variable i shouldn't be affected by this!!! In fact, when you change i
for j, everything works fine!
This has been fixed for the 8.2b3 release.
-- 08/05/1999 hobbs
welch Deleted ticket [218875ffff].
[History diff]2000-10-26 08:30:15
dgp Ticket [218875ffff]: 3 changes
[History diff]2001-04-16 20:21:03
Log in (anonymous is fine) to add a comment.