1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-09-01 01:22:01 +03:00

Improve S3 error reporting.

This commit is contained in:
David Steele
2017-06-21 20:46:49 -04:00
parent 8b9965abcb
commit f596702c5b
3 changed files with 11 additions and 3 deletions

View File

@@ -127,13 +127,13 @@ sub new
# Read the response headers
$self->{iContentLength} = undef;
my $strResponseHeader = '';
$self->{strResponseHeader} = '';
my $strHeader = trim($self->readLine());
while ($strHeader ne '')
{
# Validate header
$strResponseHeader .= "${strHeader}\n";
$self->{strResponseHeader} .= "${strHeader}\n";
my $iColonPos = index($strHeader, ':');
@@ -275,8 +275,10 @@ sub responseBody
# Properties.
####################################################################################################################################
sub contentLength {shift->{iContentLength}} # Content length if available (-1 means not known yet)
sub requestHeaderText {trim(shift->{strRequestHeader})}
sub responseCode {shift->{iResponseCode}}
sub responseHeader {shift->{hResponseHeader}}
sub responseHeaderText {trim(shift->{strResponseHeader})}
sub responseMessage {shift->{strResponseMessage}}
sub responseProtocol {shift->{strResponseProtocol}}