Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v diff -u -r1.248.2.50 -r1.248.2.51 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 23 Apr 2017 13:32:33 -0000 1.248.2.50 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 27 Apr 2017 18:18:24 -0000 1.248.2.51 @@ -3166,8 +3166,8 @@ set img [read $f] close $f } elseif {[catch { - set r [::xo::HttpRequest new -url $value -volatile] - set img [$r set data] + set request [util::http::get -url $value] + set img [expr {[dict exists $request page] ? [dict get $request page] : ""}] } errorMsg]} { # cannot transfer image my log "--img cannot tranfer image '$value' ($errorMsg)" Index: openacs-4/packages/xowiki/tcl/syndicate-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/syndicate-procs.tcl,v diff -u -r1.44 -r1.44.2.1 --- openacs-4/packages/xowiki/tcl/syndicate-procs.tcl 15 Jun 2015 19:21:06 -0000 1.44 +++ openacs-4/packages/xowiki/tcl/syndicate-procs.tcl 27 Apr 2017 18:18:24 -0000 1.44.2.1 @@ -385,13 +385,19 @@ } RSS-client instproc load { } { - set r [::xo::HttpRequest new -url [my url] -volatile] + set request [util::http::get -url [my url]] + set status [dict get $request status] + set data [expr {[dict exists $request page] ? [dict get $request page] : ""}] + #my msg "statuscode = [$r set status_code], content_type=[$r set content_type]" #set f [open /tmp/feed w]; fconfigure $f -translation binary; puts $f [$r set data]; close $f - if {[$r exists status] && [$r set status] eq "canceled"} { - my set errorMessage [$r set cancel_message] + # if {[$r exists status] && [$r set status] eq "canceled"} { + # my set errorMessage [$r set cancel_message] + # } + if {$status != 200} { + my set errorMessage "$status - $data" } - return [$r set data] + return $data # the following does not appear to be necessary due to changes in http-client-procs. #set charset utf-8 #regexp {^<\?xml\s+version\s*=\s*\S+\s+encoding\s*=\s*[\"'](\S+)[\"']} $xml _ charset Index: openacs-4/packages/xowiki/tcl/xowiki-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-procs.tcl,v diff -u -r1.485.2.64 -r1.485.2.65 --- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 22 Apr 2017 17:34:04 -0000 1.485.2.64 +++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 27 Apr 2017 18:18:24 -0000 1.485.2.65 @@ -2924,10 +2924,13 @@ Page instproc translate {-from -to text} { set langpair $from|$to set ie UTF8 - set r [xo::HttpRequest new -url http://translate.google.com/#$from/$to/$text] + set url http://translate.google.com/#$from/$to/$text + set request [util::http::get -url $url] + set status [dict get $request status] + set data [expr {[dict exists $request page] ? [dict get $request page] : ""}] + #my msg status=[$r set status] - if {[$r set status] eq "finished"} { - set data [$r set data] + if {$status == 200} { #my msg data=$data dom parse -simple -html $data doc $doc documentElement root @@ -2936,7 +2939,7 @@ if {$n ne ""} {return [$n asText]} } util_user_message -message "Could not translate text, \ - status=[$r set status]" + status=$status" return "untranslated: $text" }