Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 35fccc3a6920c90239a2bfd6638e22a99b3b3694
Ticket: 218950ffffffffffffffffffffffffffffffffff
l people listed in "Ou
User & Date: nobody on 2000-10-26 01:08:31
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    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
    
  4. foundin changed to: "obsolete: 8.2"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to: "l people listed in "Ou"
  11. type changed to: "Bug"