diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-03-19 12:02:11 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-03-19 12:02:11 (GMT) |
commit | 3cc7a1e95368183b0fa58aec6b758eea75199bc4 (patch) | |
tree | 84a38961674b5fb08a01958dbcc2b6585d78564d /library | |
parent | 0625218c8505d265ee7d2da3d8c7f7aad6879cf7 (diff) | |
parent | 203f1d691d5ce37bcf8411aba1dd89968423d97f (diff) | |
download | tcl-3cc7a1e95368183b0fa58aec6b758eea75199bc4.zip tcl-3cc7a1e95368183b0fa58aec6b758eea75199bc4.tar.gz tcl-3cc7a1e95368183b0fa58aec6b758eea75199bc4.tar.bz2 |
Merge 9.0. Backout previous commit
Diffstat (limited to 'library')
-rw-r--r-- | library/http/http.tcl | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/library/http/http.tcl b/library/http/http.tcl index c730eeb..3410c46 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -1746,6 +1746,9 @@ proc http::OpenSocket {token DoLater} { } fconfigure $sock -translation {auto crlf} \ -buffersize $state(-blocksize) + if {[package vsatisfies [package provide Tcl] 9.0-]} { + fconfigure $sock -profile replace \ + } ##Log socket opened, DONE fconfigure - token $token } @@ -2164,6 +2167,9 @@ proc http::Connected {token proto phost srvurl} { lassign [fconfigure $sock -translation] trRead trWrite fconfigure $sock -translation [list $trRead crlf] \ -buffersize $state(-blocksize) + if {[package vsatisfies [package provide Tcl] 9.0-]} { + fconfigure $sock -profile replace \ + } # The following is disallowed in safe interpreters, but the socket is # already in non-blocking mode in that case. @@ -2554,6 +2560,9 @@ proc http::ReceiveResponse {token} { lassign [fconfigure $sock -translation] trRead trWrite fconfigure $sock -translation [list auto $trWrite] \ -buffersize $state(-blocksize) + if {[package vsatisfies [package provide Tcl] 9.0-]} { + fconfigure $sock -profile replace \ + } Log ^D$tk begin receiving response - token $token coroutine ${token}--EventCoroutine http::Event $sock $token @@ -4717,7 +4726,11 @@ proc http::quoteString {string} { # a pre-computed map and [string map] to do the conversion (much faster # than [regsub]/[subst]). [Bug 1020491] - set string [encoding convertto $http(-urlencoding) $string] + if {[package vsatisfies [package provide Tcl] 9.0-]} { + set string [encoding convertto -profile replace $http(-urlencoding) $string] + } else { + set string [encoding convertto $http(-urlencoding) $string] + } return [string map $formMap $string] } |