Changeset 466
- Timestamp:
- Jun 8, 2006, 4:09:31 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/filexfer.tcl
r413 r466 698 698 set s [clock seconds] 699 699 set date [clock format $s -format {%a, %d %b %Y %H:%M:%S %Z}] 700 puts $cid "Last-Modified: $date"700 catch { puts $cid "Last-Modified: $date" } 701 701 response $cid body -type text/html -string {<html> 702 702 <head> … … 871 871 set s [clock seconds] 872 872 set date [clock format $s -format {%a, %d %b %Y %H:%M:%S %Z}] 873 puts $cid [format "HTTP/1.1 %s 873 catch { 874 puts $cid [format "HTTP/1.1 %s 874 875 Date: %s 875 876 Server: Rappture 876 877 Connection: %s" $params(-status) $date $params(-connection)] 878 } 877 879 } 878 880 … … 889 891 } 890 892 } 891 puts $cid [format "Content-type: %s\nContent-length: %d\n" \ 892 $params(-type) [string length $params(-string)]] 893 catch { 894 puts $cid [format "Content-type: %s\nContent-length: %d\n" \ 895 $params(-type) [string length $params(-string)]] 896 } 893 897 894 898 if {$mime2type($params(-type)) == "binary"} { … … 896 900 set olde [fconfigure $cid -encoding] 897 901 fconfigure $cid -buffering none -encoding binary 898 puts -nonewline $cid $params(-string) 899 flush $cid 902 catch { 903 puts -nonewline $cid $params(-string) 904 flush $cid 905 } 900 906 fconfigure $cid -buffering line -encoding $olde 901 907 } else { 902 908 # ascii data -- send normally 903 puts $cid $params(-string) 909 catch { 910 puts $cid $params(-string) 911 } 904 912 } 905 913 } … … 976 984 set s [file mtime $params(-path)] 977 985 set date [clock format $s -format {%a, %d %b %Y %H:%M:%S %Z}] 978 puts $cid "Last-Modified: $date"986 catch { puts $cid "Last-Modified: $date" } 979 987 980 988 response $cid body -type $mtype -string $data
Note: See TracChangeset
for help on using the changeset viewer.