Skip to content

ContentType is missing in creation of signature #3

@ghost

Description

Hi,

first very good module I learned a lot :)
Sadly during the creation of the singnature when using "Get-AzureBlobContainerBlobs" I found that the ContentType (application/octet-stream) was missing but send as header therefor the signatures differ. Because application/octet-stream is the default I created a workaround inside GetTokenStringToSign:

(...)
        if($RangeEnd -gt 0)
        {
            $Range="bytes=$($RangeStart)-$($RangeEnd-1)"
        }
+        if ($ContentType -eq "") {
+            $ContentType = "application/octet-stream"
+        }
        $SigningPieces=@(
            $Verb,$ContentEncoding,
            $ContentLanguage,$LengthString,
            $ContentMD5,$ContentType,$Date,$IfModifiedSince,$IfMatch,$IfNoneMatch,$IfUnmodifiedSince,$Range
        )
(...)

But maybe it is better to change $TokenParams and $RequestParams inside Get-AzureBlobContainerBlobs (and all the other where it is missing)

Kind regards,
Ralf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions