Artifacts Associated With Ticket 1869405
Ticket change [82866ca4d2] (rid 117253) by nobody on 2008-01-11 15:43:16:
- assignee initialized to: "andreas_kupries"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Command "gets" in tcl8.5 returns invalid data when reading from a tls-channel in binary mode. Tcl8.4.16 returns valid data. example: ############################################## # start a ssl server with openssl s_server -cert cert.pem -key key.pem -www ############################################## # run the following tcl script: package require tls set chan [::tls::socket 127.1 4433] puts -nonewline $chan "GET / HTTP/1.0\r\n" flush $chan fconfigure $chan -encoding binary -translation binary while {[gets $chan LINE] >= 0} {puts $LINE} ############################################### - foundin initialized to: "obsolete: 8.5.0"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "25. Channel System"
- title initialized to: "gets returns crap on tls-channels"
- type initialized to: "Bug"
Ticket change [67f535d783] (rid 102980) by fomp on 2008-01-20 08:47:53:
- icomment:
Logged In: YES user_id=411868 Originator: NO TclGetsObjBinary doesn't use the TopChan. The following patch fixes this.
- login: "fomp"
- mimetype: "text/plain"
- username: "fomp"
- icomment:
Ticket change [4262ad5e02] (rid 116370) by fomp on 2008-01-20 08:53:08:
- icomment:
Logged In: YES user_id=411868 Originator: NO ups, forgot the patch... --- generic/tclIO.c 13 Dec 2007 15:23:17 -0000 1.136 +++ generic/tclIO.c 20 Jan 2008 01:14:09 -0000 @@ -3953,12 +3953,6 @@ char *dst, *dstEnd, *eol, *eof; Tcl_EncodingState oldState; - /* - * This operation should occur at the top of a channel stack. - */ - - chanPtr = statePtr->topChanPtr; - if (CheckChannelErrors(statePtr, TCL_READABLE) != 0) { copiedTotal = -1; goto done; @@ -3976,6 +3970,12 @@ return TclGetsObjBinary(chan, objPtr); } + /* + * This operation should occur at the top of a channel stack. + */ + + chanPtr = statePtr->topChanPtr; + bufPtr = statePtr->inQueueHead; encoding = statePtr->encoding; @@ -4319,6 +4319,12 @@ bufPtr = statePtr->inQueueHead; /* + * This operation should occur at the top of a channel stack. + */ + + chanPtr = statePtr->topChanPtr; + + /* * Preserved so we can restore the channel's state in case we don't find a * newline in the available input. */ - login: "fomp"
- mimetype: "text/plain"
- username: "fomp"
- icomment:
Ticket change [2d823ad982] (rid 119080) by hobbs on 2008-01-21 04:16:40:
- assignee changed to: "hobbs"
- closedate changed to: "2008-01-20T21:16:40"
- closer changed to: "hobbs"
- icomment:
Logged In: YES user_id=72656 Originator: NO Fixed for 8.5.1.
- login: "hobbs"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "hobbs"