Skip to content
Tcl Source Code History Of Ticket 1510702fffffffff
Login

History Of Ticket 1510702fffffffff

Artifacts Associated With Ticket 1510702fffffffff

  1. Ticket change [3dbab6185e] (rid 121141) by nobody on 2006-06-22 14:36:38:

    1. assignee initialized to: "andreas_kupries"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      I met with the problem when it took cca. 20 secs for
      ::http::geturl to return form an url fetch that was
      instantenous in Mozilla Firefox.
      
      I then tried my old code I had written for the same
      purpose:
      
      ##################################################################
      proc rdhdrs {chan} {
         global headers
      #Separate the headers from the body
         if {[set n [gets $chan s]] != 0} {
            if {$n < 0} {return}
                append headers $s\n
         } else {
            fconfigure $chan -translation binary -encoding binary
            fileevent $chan readable [list rdcont $chan]
         }
      }
      
      proc rdcont {chan} {
         global FL body
         set frag [read $chan]
         if {![eof $chan]} {
            append body $frag
         } else {   
            fileevent $chan readable {}
            set FL 1
         }
      }
      
      proc geturl {host resrc cki} {
         global FL body rqhdrs headers 
         set headers ""
      
         set ch [socket $host 80]
         fconfigure $ch -translation {auto crlf} -blocking 0
      -buffersize 8192 
      #   fconfigure $ch -translation {auto crlf} -blocking 0
      -buffering line -buffersize 8192 
         fileevent $ch readable [list rdhdrs $ch]
         
         puts $ch "GET $resrc HTTP/1.1"
         puts $ch "Host: $host"
         puts $ch $rqhdrs
         if {$cki ne ""} {puts $ch $cki}
         puts $ch ""
       
         flush $ch
        
         vwait FL
         close $ch
      }
      ##################################################################
      
      As it turns out the read command that should detect the
      eof condition after the message body has been read in
      does not returns immediaely but only after the above
      long delay that seems to be a time-out. The result is
      the same if "-blocking 1" is set on the channel.
      
      I also noticed another newly occuring problem. The
      original version worked with "-buffering line" and
      without the flush command. Http sniffing revealed that
      in this case now only the first line was sent.
      
      I have recently changed to 8.4.13 from either 8.4.9 or
      8.4.11 (I can remember which) and until now I have not
      faced this problem although I use WEB scraping quite
      frequently for complex search sequences.
      
      Joe Nemeth
      [email protected]
      
      
    4. foundin initialized to: "obsolete: 8.4.13"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "24. Channel Commands"
    10. title initialized to: "8.4.13 on win2k: eof problem on socket channels "
    11. type initialized to: "Bug"
  2. Ticket change [fd03409143] (rid 108337) by nobody on 2006-06-23 01:49:41:

    1. icomment:
      Logged In: NO 
      
      I am withdrawing this as a tcl bug report. Te bug is on my
      side, the "Connection: close" header should have been
      included when I has changed the protocol from 1.0 to 1.1.
      
      Sorry.
      
      Joe Németh
      
      
      
      
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  3. Ticket change [ce20008550] (rid 96006) by dgp on 2006-06-23 03:22:52:

    1. assignee changed to: "dgp"
    2. closedate changed to: "2006-06-22T20:22:52"
    3. closer changed to: "dgp"
    4. resolution changed to: "Invalid"
    5. status changed to: "Deleted"