Changeset 14260 for gsdl/trunk/cgi-bin/gliserver.pl
- Timestamp:
- 2007-07-18T11:12:26+12:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/cgi-bin/gliserver.pl
r14236 r14260 848 848 849 849 # Read the uploaded data and write it out to file 850 # We have to pass the size of the uploaded data in the "fs" argument because IIS 6 seems to be 851 # completely incapable of working this out otherwise (causing the old code to crash) 850 852 my $buf; 851 853 my $num_bytes = 0; 854 my $num_bytes_remaining = $gsdl_cgi->clean_param("fs"); 855 my $bytes_to_read = $num_bytes_remaining; 856 if ($bytes_to_read > 1024) { $bytes_to_read = 1024; } 852 857 binmode(FOUT); 853 while (read(STDIN, $buf, 1024) > 0) {858 while (read(STDIN, $buf, $bytes_to_read) > 0) { 854 859 print FOUT $buf; 855 860 $num_bytes += length($buf); 861 $num_bytes_remaining -= length($buf); 862 $bytes_to_read = $num_bytes_remaining; 863 if ($bytes_to_read > 1024) { $bytes_to_read = 1024; } 856 864 } 857 865 close(FOUT);
Note:
See TracChangeset
for help on using the changeset viewer.