From 5e7021646a11b3a45ebc18aae9007955f0e06044 Mon Sep 17 00:00:00 2001 From: Maarten Vanraes Date: Sat, 1 Feb 2020 15:49:55 +0100 Subject: version 0.5.1: hotfix for binmode for STDOUT --- VERSION | 2 +- urpmi-proxy.cgi | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 8f0916f..4b9fcbe 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.5.0 +0.5.1 diff --git a/urpmi-proxy.cgi b/urpmi-proxy.cgi index fa7ccca..583a6b1 100755 --- a/urpmi-proxy.cgi +++ b/urpmi-proxy.cgi @@ -447,6 +447,7 @@ sub flush_buffer { ${$data->{file_sent}} += ${$data->{pos}}; } # output + binmode(STDOUT); print ${$data->{buffer}}; # clear buffer ${$data->{buffer}} = ''; @@ -487,7 +488,7 @@ sub write_function { ($sec, $usec) = gettimeofday; print STDERR "[$sec,$usec]: write: print STDOUT\n" if $debug; # output - binmode STDOUT; + binmode(STDOUT); print $ptr; ($sec, $usec) = gettimeofday; print STDERR "[$sec,$usec]: write: return\n" if $debug; @@ -523,6 +524,7 @@ sub return_file { print "Last-Modified: " . $t . "\r\n"; print "\r\n"; binmode(FILE); + binmode(STDOUT); my $buf; while (read(FILE, $buf, 1024)) { print $buf; -- cgit v1.2.1