X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.web-live.git;a=blobdiff_plain;f=pctb%2FCommods.pm;fp=pctb%2FCommods.pm;h=5eb9c7bba749cb1a09888c0b32c9bd9608cae499;hp=073906ff9da07defd3a8aa3380115ffc6c3cbcd9;hb=34c9aa9031897dada3450d014de96d68a5834039;hpb=b958771fa67513ba09630953ec91b9d21b3f42f9 diff --git a/pctb/Commods.pm b/pctb/Commods.pm index 073906f..5eb9c7b 100644 --- a/pctb/Commods.pm +++ b/pctb/Commods.pm @@ -117,7 +117,10 @@ sub get_our_version ($$) { my ($aref,$prefix) = @_; $aref->{"${prefix}name"}= 'ypp-sc-tools yarrg'; $aref->{"${prefix}fixes"}= 'lastpage'; - $aref->{"${prefix}version"}= `git-describe --tags HEAD`; $? and die $?; + + my $version= `git-describe --tags HEAD`; $? and die $?; + chomp($version); + $aref->{"${prefix}version"}= $version; return $aref; } @@ -148,7 +151,7 @@ sub pipethrough_run_gzip ($) { sub cgipostform ($$$) { my ($ua, $url, $form) = @_; - my $req= HTTP::Request::Common::POST($url, + my $req= HTTP::Request::Common::POST($url, Content => $form, Content_Type => 'form-data'); if ($url =~ m,^\.?/,) { @@ -173,6 +176,7 @@ sub cgipostform ($$$) { } #system 'printenv >&2'; }, "$url", "$url"); + $out =~ s/\r\n/\n/g; $out =~ m,^Content-Type: text/plain.*\n\n, or die "$out ?"; return $'; } else {