Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 6024576d5289454845bbc91dd8d115225b4ab63c
Ticket: 2624536fffffffffffffffffffffffffffffffff
newer http prevents connection
User & Date: teopetuk on 2009-03-29 15:08:14
Changes

  1. icomment:
    It seems to me that this bug occurs because ::http::Event procedure switches from "connecting" state too early (before the initial HTTP line is received). The following patch prevents from switching to "header" state if gets returned -1 (though I'm not sure if this patch fixes the bug completely):
    
    --- http.tcl.orig
    +++ http.tcl
    @@ -943,9 +943,10 @@
            return
         }
         if {$state(state) eq "connecting"} {
    -       set state(state) "header"
            if {[catch {gets $sock state(http)} n]} {
                return [Finish $token $n]
    +       } elseif {$n >= 0} {
    +           set state(state) "header"
            }
         } elseif {$state(state) eq "header"} {
            if {[catch {gets $sock line} n]} {
    
    
  2. login: "teopetuk"
  3. mimetype: "text/plain"
  4. username: "teopetuk"