Uploaded image for project: 'jclouds'
  1. jclouds
  2. JCLOUDS-1358

putBlob with zero length InputSteam is failing for aws s3

    XMLWordPrintableJSON

Details

    Description

      Right now there is a method payload(InputStream stream) in BlobBuilder, for uploading streamed bytes to blob stores. However, when I open InputStream from empty file I am getting following error :

      Caused by: org.jclouds.http.HttpException: unable to reset unrepeatable payload stream after calculating AWS4 signature.
      at org.jclouds.s3.filters.Aws4SignerForAuthorizationHeader.closeOrResetPayloadStream(Aws4SignerForAuthorizationHeader.java:215)
      at org.jclouds.s3.filters.Aws4SignerForAuthorizationHeader.calculatePayloadContentHash(Aws4SignerForAuthorizationHeader.java:200)
      at org.jclouds.s3.filters.Aws4SignerForAuthorizationHeader.getPayloadHash(Aws4SignerForAuthorizationHeader.java:176)
      at org.jclouds.s3.filters.Aws4SignerForAuthorizationHeader.sign(Aws4SignerForAuthorizationHeader.java:144)
      at org.jclouds.s3.filters.RequestAuthorizeSignatureV4.signForAuthorizationHeader(RequestAuthorizeSignatureV4.java:91)
      at org.jclouds.aws.s3.filters.AWSRequestAuthorizeSignatureV4.signForAuthorizationHeader(AWSRequestAuthorizeSignatureV4.java:60)
      at org.jclouds.s3.filters.RequestAuthorizeSignatureV4.filter(RequestAuthorizeSignatureV4.java:55)
      at org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:92)
      ... 92 more
      

      Attachments

        Activity

          People

            gaul Andrew Gaul
            dgyurdzhekliev Deyan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: