X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.web-live.git;a=blobdiff_plain;f=pctb%2Fcommod-update-receiver;h=11064cd7d9b6897f9194116690602eebb71e3e81;hp=ac52fec7fe89499ab5feed1ca168ec858c0f1776;hb=34c9aa9031897dada3450d014de96d68a5834039;hpb=b958771fa67513ba09630953ec91b9d21b3f42f9 diff --git a/pctb/commod-update-receiver b/pctb/commod-update-receiver index ac52fec..11064cd 100755 --- a/pctb/commod-update-receiver +++ b/pctb/commod-update-receiver @@ -120,9 +120,11 @@ foreach my $cs (qw(client server)) { } foreach my $vn (sort keys %o) { - my $mpart= MIME::Entity->build(Type => 'text/plain', + my $mpart= MIME::Entity->build(Top => 0, + Type => 'text/plain', Charset => 'utf-8', - Disposition => 'inline', + Disposition => 'attachment', + Filename => $vn, Data => $o{$vn}); $mcontent->add_part($mpart); } @@ -156,15 +158,21 @@ while () { GZ->error and die $!; $?=0; close GZ; $? and fail("gunzip for check failed code $?"); -my $mdatafile= MIME::Entity->build(Type => 'application/octet-stream', +my $mdatafile= MIME::Entity->build(Top => 0, + Type => 'application/octet-stream', Disposition => 'attachment', Encoding => 'base64', - File => $datafile); + Filename => 'deduped.tsv.gz', + Path => $datafile); $mcontent->add_part($mdatafile); -open M, "|/usr/sbin/sendmail -t -oi -oee -odq" +open M, "|/usr/sbin/sendmail -t -oi -oee -odb" or fail("fork sendmail failed! ($!)"); $mcontent->print(\*M); M->error and fail("write sendmail failed! ($!)"); $?=0; close M; $? and fail("sendmail failed code $?"); + +print header(-type=>'text/plain', -charset=>'us-ascii'), + "OK\n" + or die $!;