Index: openacs-4/packages/xotcl-core/tcl/http-client-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/http-client-procs.tcl,v diff -u -N -r1.24 -r1.25 --- openacs-4/packages/xotcl-core/tcl/http-client-procs.tcl 14 Jan 2010 10:34:57 -0000 1.24 +++ openacs-4/packages/xotcl-core/tcl/http-client-procs.tcl 16 Jul 2010 10:59:46 -0000 1.25 @@ -126,6 +126,7 @@ Attribute create port Attribute create path -default "/" Attribute create url + Attribute create method Attribute create post_data -default "" Attribute create content_type -default "text/plain" Attribute create request_header_fields -default {} @@ -256,8 +257,12 @@ HttpCore instproc init {} { my instvar S post_data host port protocol my destroy_on_cleanup + my set meta [list] my set data "" + if {![my exists method]} { + my set method [expr {$post_data eq "" ? "GET" : "POST"}] + } if {[my exists url]} { my parse_url } else { @@ -283,9 +288,8 @@ } HttpCore instproc send_request {} { - my instvar S post_data host + my instvar S post_data host method if {[catch { - set method [expr {$post_data eq "" ? "GET" : "POST"}] puts $S "$method [my path] HTTP/1.0" puts $S "Host: $host" puts $S "User-Agent: [my user_agent]"