From: SourceForge.net <no...@so...> - 2009-03-30 19:19:50
|
Bugs item #2624536, was opened at 2009-02-21 08:48 Message generated for change (Comment added) made by andreas_kupries You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=2624536&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 29. http Package Group: current: 8.5.6 Status: Open Resolution: None Priority: 9 Private: No Submitted By: Sander Hoentjen (tjikkun) Assigned to: Pat Thoyts (patthoyts) Summary: newer http prevents connection Initial Comment: I seem to be having a problem with http 2.7.2 with it, amsn doesn't connect If i revert the change from http://tcl.cvs.sourceforge.net/viewvc/tcl/tcl/library/http/http.tcl?r1=1.71&r2=1.72&pathrev=MAIN between line 1026 and 1027 it works again. A puts on $line gives me: HTTP/1.1 200 OK HTTP/1.1 200 OK This is with amsn 0.97.2 P.S. with amsn latest svn there is a different bug when used with http 2.7.2, if I have time I will try to investigate that one also. ---------------------------------------------------------------------- >Comment By: Andreas Kupries (andreas_kupries) Date: 2009-03-30 12:19 Message: Pat, we recently talked about http, and I told you that with http 2.7.2 I got an empty result for some urls (sourceforge xml tracker export). Applying teopetuk's change to my local copy of http 2.7.2 fixed that problem. ---------------------------------------------------------------------- Comment By: Sergei Golovan (teopetuk) Date: 2009-03-29 01:08 Message: 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]} { ---------------------------------------------------------------------- Comment By: Sander Hoentjen (tjikkun) Date: 2009-02-23 10:55 Message: I just found out the bug with amsn svn is not a different one, it is fixed by the same fix as above: # cvs diff -u cvs diff: Diffing . Index: http.tcl =================================================================== RCS file: /cvsroot/tcl/tcl/library/http/http.tcl,v retrieving revision 1.72 diff -u -r1.72 http.tcl --- http.tcl 23 Oct 2008 23:17:38 -0000 1.72 +++ http.tcl 23 Feb 2009 18:55:05 -0000 @@ -1024,6 +1024,8 @@ } } lappend state(meta) $key [string trim $value] + } elseif {[string match HTTP* $line]} { + set state(http) $line } } } else { ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=2624536&group_id=10894 |