Index: openacs-4/packages/acs-tcl/tcl/http-client-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/http-client-procs.tcl,v diff -u -r1.30.2.20 -r1.30.2.21 --- openacs-4/packages/acs-tcl/tcl/http-client-procs.tcl 12 Mar 2021 10:24:42 -0000 1.30.2.20 +++ openacs-4/packages/acs-tcl/tcl/http-client-procs.tcl 2 Aug 2021 21:26:54 -0000 1.30.2.21 @@ -789,9 +789,9 @@ if {$spool_file eq ""} { # create the spool file - set spool_file [ad_tmpnam] - set wfd [open $spool_file w] + set wfd [file tempfile spool_file [ad_tmpdir]/http-spool-XXXXXX] fconfigure $wfd -translation binary + # flush currently collected payload puts -nonewline $wfd $payload # set required encoding for next content @@ -1683,8 +1683,7 @@ # and let it be read by curl. set create_body_file_p [expr {$body_file eq ""}] if {$create_body_file_p} { - set body_file [ad_tmpnam] - set wfd [open $body_file w] + set wfd [file tempfile body_file [ad_tmpdir]/http-spool-XXXXXX] fconfigure $wfd -translation binary puts -nonewline $wfd $body close $wfd