Tcl Source Code

Check-in [f9a94facca]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:
* library/http/http.tcl (http::Connect): [Bug 3472316]: Ensure that we only try to read the socket error exactly once.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f9a94facca4502d6f81f1ed247ae58ec7bebc9f8
User & Date: dkf 2012-01-13 11:50:41
Context
2012-01-16
13:32
Ensure that error messages are always set, even in believed-unreachable code. check-in: 4366119ec4 user: dkf tags: trunk
2012-01-13
11:50
* library/http/http.tcl (http::Connect): [Bug 3472316]: Ensure that we only try to read the socket...
check-in: f9a94facca user: dkf tags: trunk
11:48
* library/http/http.tcl (http::Connect): [Bug 3472316]: Ensure that we only try to read the socket...
check-in: bb0af2dfb6 user: dkf tags: core-8-5-branch
2012-01-12
20:40
[Bug 3472316] Document the destructive semantics of [fconfigure -error] on sockets. check-in: daf88a2bd0 user: ferrieux tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.






1
2
3
4
5
6
7





2012-01-12  Donal K. Fellows  <[email protected]>

	* doc/tclvars.n: [Bug 3466506]: Document more environment variables.

2012-01-09  Jan Nijtmans  <[email protected]>

	* generic/tclUtf.c:      [Bug 3464428]: string is graph \u0120 is wrong
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
2012-01-13  Donal K. Fellows  <[email protected]>

	* library/http/http.tcl (http::Connect): [Bug 3472316]: Ensure that we
	only try to read the socket error exactly once.

2012-01-12  Donal K. Fellows  <[email protected]>

	* doc/tclvars.n: [Bug 3466506]: Document more environment variables.

2012-01-09  Jan Nijtmans  <[email protected]>

	* generic/tclUtf.c:      [Bug 3464428]: string is graph \u0120 is wrong

Changes to library/http/http.tcl.

863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
# Side Effects
#	Sets the status of the connection, which unblocks
# 	the waiting geturl call

proc http::Connect {token} {
    variable $token
    upvar 0 $token state
    global errorInfo errorCode
    if {
	[eof $state(sock)] ||
	[string length [fconfigure $state(sock) -error]]
    } {
	Finish $token "connect failed [fconfigure $state(sock) -error]" 1
    } else {
	set state(status) connect
	fileevent $state(sock) writable {}
    }
    return
}








<


|

|







863
864
865
866
867
868
869

870
871
872
873
874
875
876
877
878
879
880
881
# Side Effects
#	Sets the status of the connection, which unblocks
# 	the waiting geturl call

proc http::Connect {token} {
    variable $token
    upvar 0 $token state

    if {
	[eof $state(sock)] ||
	[set err [fconfigure $state(sock) -error]] ne ""
    } {
	Finish $token "connect failed $err" 1
    } else {
	set state(status) connect
	fileevent $state(sock) writable {}
    }
    return
}