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.1.2.13 -r1.1.2.14 --- openacs-4/packages/acs-tcl/tcl/http-client-procs.tcl 28 Nov 2014 09:15:23 -0000 1.1.2.13 +++ openacs-4/packages/acs-tcl/tcl/http-client-procs.tcl 21 Jan 2015 10:24:30 -0000 1.1.2.14 @@ -686,7 +686,7 @@ @param timeout Timeout in seconds. The value can be an integer, a floating point number or an ns_time value. - @return Returns the data as dict with elements page, + @return Returns the data as dict with elements headers, page, file, status, and modified. } { @@ -802,6 +802,8 @@ set content_encoding [ns_set iget $resp_headers content-encoding] set location [ns_set iget $resp_headers location] set last_modified [ns_set iget $resp_headers last-modified] + # Move in a list to be returned to the caller + set r_headers [ns_set array $resp_headers] ns_set free $resp_headers @@ -902,6 +904,7 @@ return [list \ + headers $r_headers \ page $page \ file $spool_file \ status $status \ @@ -1022,7 +1025,7 @@ before 7.32.0 just accept integer, the granularity is set to seconds. - @return Returns the data as dict with elements page, + @return Returns the data as dict with elements headers, page, file, status, and modified. } { @@ -1152,13 +1155,15 @@ set line [split $line ":"] set key [lindex $line 0] set value [join [lrange $line 1 end] ":"] - ns_set put $resp_headers $key $value + ns_set put $resp_headers $key [string trim $value] } close $rfd # Get values from response headers, then remove them set content_type [ns_set iget $resp_headers content-type] set last_modified [ns_set iget $resp_headers last-modified] + # Move in a list to be returned to the caller + set r_headers [ns_set array $resp_headers] ns_set free $resp_headers set status [string range $response end-2 end] @@ -1179,6 +1184,7 @@ file delete $data_binary_tmpfile return [list \ + headers $r_headers \ page $page \ file $spool_file \ status $status \