Skip to content

Commit 1d1a2be

Browse files
Fixed stupid error from not checking error codes in signing callbacks. (aws#76)
1 parent 0500734 commit 1d1a2be

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

source/auth/Sigv4Signing.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,12 @@ namespace Aws
146146
static void s_http_signing_complete_fn(struct aws_signing_result *result, int errorCode, void *userdata)
147147
{
148148
auto cbData = reinterpret_cast<HttpSignerCallbackData *>(userdata);
149-
aws_apply_signing_result_to_http_request(
150-
cbData->Request->GetUnderlyingMessage(), cbData->Alloc, result);
149+
150+
if (errorCode == AWS_OP_SUCCESS)
151+
{
152+
aws_apply_signing_result_to_http_request(
153+
cbData->Request->GetUnderlyingMessage(), cbData->Alloc, result);
154+
}
151155

152156
cbData->OnRequestSigningComplete(cbData->Request, errorCode);
153157
Crt::Delete(cbData, cbData->Alloc);

0 commit comments

Comments
 (0)