• Resolved conradde

    (@conradde)


    Hi, I have been using the static-porter plugin. thankyou its really quite useful.
    I thought I would share a bug i had with the signed header for AWS uploads failing.
    line 1264 changes the case of the entry ‘Content-Type’ and invalidates the signed header. Commenting this line out seems to fix the issue.

         $content_type = static_porter_guess_mime($file_path);
    $headers = static_porter_aws_sigv4('PUT', $host, $uri, $region, 's3', $body, [
    'content-type' => $content_type,
    ], $access_key, $secret_key);
    // $headers['Content-Type'] = $content_type;

    $response = wp_remote_request('https://' . $host . $uri, [
    'method' => 'PUT',
    'headers' => $headers,
    'body' => $body,
    'timeout' => 60,
    ]);

Viewing 1 replies (of 1 total)
  • Plugin Author Kayıhan Turgutoğlu

    (@kturgutoglu)

    Thank you, that was exactly right. Version 4.2.1 fixes it, including the same duplicate header in the CloudFront invalidation call, and it also fixes file names with characters like @ or spaces. Please let me know if you still see any signature errors.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.