{"action":"closed","issue":{"url":"https://api.github.com/repos/aws/aws-sdk-net/issues/678","repository_url":"https://api.github.com/repos/aws/aws-sdk-net","labels_url":"https://api.github.com/repos/aws/aws-sdk-net/issues/678/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-sdk-net/issues/678/comments","events_url":"https://api.github.com/repos/aws/aws-sdk-net/issues/678/events","html_url":"https://github.com/aws/aws-sdk-net/issues/678","id":237382184,"number":678,"title":"S3 Signature V4 Chunked Upload seems to be missing the required Content-Encoding header","user":{"login":"GuySirton","id":4914433,"avatar_url":"https://avatars3.githubusercontent.com/u/4914433?v=4","gravatar_id":"","url":"https://api.github.com/users/GuySirton","html_url":"https://github.com/GuySirton","followers_url":"https://api.github.com/users/GuySirton/followers","following_url":"https://api.github.com/users/GuySirton/following{/other_user}","gists_url":"https://api.github.com/users/GuySirton/gists{/gist_id}","starred_url":"https://api.github.com/users/GuySirton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuySirton/subscriptions","organizations_url":"https://api.github.com/users/GuySirton/orgs","repos_url":"https://api.github.com/users/GuySirton/repos","events_url":"https://api.github.com/users/GuySirton/events{/privacy}","received_events_url":"https://api.github.com/users/GuySirton/received_events","type":"User","site_admin":false},"labels":[{"id":130111443,"url":"https://api.github.com/repos/aws/aws-sdk-net/labels/Question","name":"Question","color":"fbca04","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-06-21T00:30:29Z","updated_at":"2017-07-17T19:42:23Z","closed_at":"2017-07-17T19:42:23Z","body":"The content-encoding: aws-chunked header appears to be missing from simple S3 PUT object requests made with the SDK.  This header is seemingly required per the Amazon docs [Transferring Payload in Multiple Chunks](http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-streaming.html#example-signature-calculations-streaming):\r\n\r\n> you must include the following headers: ... Content-Encoding ... Set the value to aws-chunked. \r\n\r\nThe absence of the header causes the upload to fail with some 3rd party S3 implementations and could fail in the future with AWS S3.\r\n\r\n## Expected Behavior\r\nHTTP request with chunked upload should have the Content-Encoding HTTP header set to aws-chunked.\r\n\r\n## Current Behavior\r\nUploading an object via PutObjectRequest results in the following (Wireshark captured) request:\r\n\r\n> PUT /bucket-65916701/object-67786390 HTTP/1.1\r\n> Content-Type: text/plain\r\n> x-amz-meta-color: Yellow\r\n> x-amz-meta-size: Large\r\n> User-Agent: aws-sdk-dotnet-45/3.3.7.0 aws-sdk-dotnet-core/3.3.14.1 .NET_Runtime/4.0 .NET_Framework/4.0 OS/Microsoft_Windows_NT_6.1.7601_Service_Pack_1 ClientSync\r\n> host: 10.96.99.147:18082\r\n> X-Amz-Date: 20170620T220803Z\r\n> X-Amz-Decoded-Content-Length: 5\r\n> X-Amz-Content-SHA256: STREAMING-AWS4-HMAC-SHA256-PAYLOAD\r\n> Authorization: AWS4-HMAC-SHA256 Credential=3BH0GKN78U80LK4MTOX8/20170620/us-east-1/s3/aws4_request, SignedHeaders=content-length;content-type;host;user-agent;x-amz-content-sha256;x-amz-date;x-amz-decoded-content-length;x-amz-meta-color;x-amz-meta-size, Signature=7360771f56b9fcd0abe0a638b8a94e29774c85a61f2825def4fa237c5223ac09\r\n> Content-Length: 177\r\n> Expect: 100-continue\r\n> \r\n> HTTP/1.1 100 Continue\r\n> \r\n> 5;chunk-signature=1d3be98c5974e40689bb9cb22a4ec760050e8efcef603759050b043348de8b21\r\n> Hello\r\n> 0;chunk-signature=dcb82f2f6f476b08a8bc54e5ad84189098d0c2627652326102f3b2ebfb431fcc\r\n\r\n## Possible Solution\r\nhttps://github.com/aws/aws-sdk-net/blob/1fb233d6ebe1e988c847699f936e4b87034d5774/sdk/src/Core/Amazon.Runtime/Internal/Auth/AWS4Signer.cs#L428\r\n\r\nThis code appears to append the content encoding if one is present but doesn't create the header otherwise.  Create the header here if there is none.\r\n\r\n## Steps to Reproduce (for bugs)\r\n```\r\nPutObjectRequest request = new PutObjectRequest()\r\n            {\r\n                BucketName = \"bucket-65916701\",\r\n                Key = \"object-67786390\",\r\n                ContentBody = \"Hello\"\r\n            };\r\nrequest.Metadata.Add(\"color\", \"Yellow\");\r\nrequest.Metadata.Add(\"size\", \"Large\");\r\nPutObjectResponse response = s3Client.PutObject(request);\r\n```\r\n\r\n## Context\r\nI'm using the SDK with in-house S3 compatible software and I'm unable to upload objects into the system.\r\n\r\n## Your Environment\r\nAWSToolsAndSDKForNet_sdk-3.3.111.0_ps-3.3.109.0_tk-1.12.1.1\r\n\r\n<!--- Include as many relevant details about the environment where the bug was discovered -->\r\n* AWSSDK.Core version used: 3.3.0.0\r\n* Operating System and version:  Windows 7 x64\r\n* Visual Studio version:  2015 Professional\r\n* Targeted .NET platform: 4.5.2\r\n\r\n## .NET Core Info\r\n<!--- For .NET Core issues, please provide the following -->\r\n* .NET Core version used for development: 4.5.2\r\n* .NET Core version installed in the environment where application runs: 4.5.2\r\n* Contents of project.json/project.csproj: \r\n\r\n```\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <PropertyGroup>\r\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\r\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\r\n    <ProductVersion>9.0.30729</ProductVersion>\r\n    <SchemaVersion>2.0</SchemaVersion>\r\n    <ProjectGuid>{2ECCA326-DA2E-4B3E-8152-459FF716B7FC}</ProjectGuid>\r\n    <OutputType>Exe</OutputType>\r\n    <AppDesignerFolder>Properties</AppDesignerFolder>\r\n    <RootNamespace>S3TestClientCSharp</RootNamespace>\r\n    <AssemblyName>S3TestClientCSharp</AssemblyName>\r\n    <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>\r\n    <FileAlignment>512</FileAlignment>\r\n    <IsWebBootstrapper>false</IsWebBootstrapper>\r\n    <FileUpgradeFlags>\r\n    </FileUpgradeFlags>\r\n    <OldToolsVersion>3.5</OldToolsVersion>\r\n    <UpgradeBackupLocation />\r\n    <PublishUrl>publish\\</PublishUrl>\r\n    <Install>true</Install>\r\n    <InstallFrom>Disk</InstallFrom>\r\n    <UpdateEnabled>false</UpdateEnabled>\r\n    <UpdateMode>Foreground</UpdateMode>\r\n    <UpdateInterval>7</UpdateInterval>\r\n    <UpdateIntervalUnits>Days</UpdateIntervalUnits>\r\n    <UpdatePeriodically>false</UpdatePeriodically>\r\n    <UpdateRequired>false</UpdateRequired>\r\n    <MapFileExtensions>true</MapFileExtensions>\r\n    <ApplicationRevision>0</ApplicationRevision>\r\n    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>\r\n    <UseApplicationTrust>false</UseApplicationTrust>\r\n    <BootstrapperEnabled>true</BootstrapperEnabled>\r\n    <TargetFrameworkProfile />\r\n    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\r\n    <DebugSymbols>true</DebugSymbols>\r\n    <DebugType>full</DebugType>\r\n    <Optimize>false</Optimize>\r\n    <OutputPath>bin\\Debug\\</OutputPath>\r\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n    <DocumentationFile>\r\n    </DocumentationFile>\r\n    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\r\n    <DebugType>pdbonly</DebugType>\r\n    <Optimize>true</Optimize>\r\n    <OutputPath>bin\\Release\\</OutputPath>\r\n    <DefineConstants>TRACE</DefineConstants>\r\n    <ErrorReport>prompt</ErrorReport>\r\n    <WarningLevel>4</WarningLevel>\r\n    <DocumentationFile>\r\n    </DocumentationFile>\r\n    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\r\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.\r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  <Target Name=\"BeforeBuild\">\r\n  </Target>\r\n  <Target Name=\"AfterBuild\">\r\n  </Target>\r\n  -->\r\n  <Choose>\r\n    <When Condition=\" '$(TargetFrameworkVersion)' == 'v3.5' Or '$(TargetFrameworkVersion)' == 'v4.0' \">\r\n      <ItemGroup>\r\n        <Reference Include=\"AWSSDK.Core, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL\">\r\n          <SpecificVersion>False</SpecificVersion>\r\n          <Private>True</Private>\r\n          <HintPath>C:\\Program Files (x86)\\AWS SDK for .NET\\bin\\Net35\\AWSSDK.Core.dll</HintPath>\r\n        </Reference>\r\n        <Reference Include=\"AWSSDK.EC2, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL\">\r\n          <SpecificVersion>False</SpecificVersion>\r\n          <Private>True</Private>\r\n          <HintPath>C:\\Program Files (x86)\\AWS SDK for .NET\\bin\\Net35\\AWSSDK.EC2.dll</HintPath>\r\n        </Reference>\r\n        <Reference Include=\"AWSSDK.SimpleDB, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL\">\r\n          <SpecificVersion>False</SpecificVersion>\r\n          <Private>True</Private>\r\n          <HintPath>C:\\Program Files (x86)\\AWS SDK for .NET\\bin\\Net35\\AWSSDK.SimpleDB.dll</HintPath>\r\n        </Reference>\r\n        <Reference Include=\"AWSSDK.S3, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL\">\r\n          <SpecificVersion>False</SpecificVersion>\r\n          <Private>True</Private>\r\n          <HintPath>C:\\Program Files (x86)\\AWS SDK for .NET\\bin\\Net35\\AWSSDK.S3.dll</HintPath>\r\n        </Reference>\r\n      </ItemGroup>\r\n    </When>\r\n    <Otherwise />\r\n  </Choose>\r\n  <ItemGroup>\r\n    <Reference Include=\"AWSSDK.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=885c28607f98e604, processorArchitecture=MSIL\">\r\n     <SpecificVersion>False</SpecificVersion>\r\n      <HintPath>..\\..\\..\\..\\Program Files (x86)\\AWS SDK for .NET\\bin\\Net45\\AWSSDK.Core.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"AWSSDK.S3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=885c28607f98e604, processorArchitecture=MSIL\">\r\n      <SpecificVersion>False</SpecificVersion>\r\n      <HintPath>..\\..\\..\\..\\Program Files (x86)\\AWS SDK for .NET\\bin\\Net45\\AWSSDK.S3.dll</HintPath>\r\n    </Reference>\r\n    <Reference Include=\"System\" />\r\n    <Reference Include=\"System.Core\" />\r\n    <Reference Include=\"System.configuration\" />\r\n    <Reference Include=\"System.Xml.Linq\" />\r\n    <Reference Include=\"System.Data.DataSetExtensions\" />\r\n    <Reference Include=\"Microsoft.CSharp\" />\r\n    <Reference Include=\"System.Data\" />\r\n    <Reference Include=\"System.Xml\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"S3TestClientCSharp.cs\" />\r\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <BootstrapperPackage Include=\"Microsoft.Net.Client.3.5\">\r\n      <Visible>False</Visible>\r\n      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>\r\n      <Install>false</Install>\r\n    </BootstrapperPackage>\r\n    <BootstrapperPackage Include=\"Microsoft.Net.Framework.2.0\">\r\n      <Visible>False</Visible>\r\n      <ProductName>.NET Framework 2.0 %28x86%29</ProductName>\r\n      <Install>true</Install>\r\n    </BootstrapperPackage>\r\n    <BootstrapperPackage Include=\"Microsoft.Net.Framework.3.0\">\r\n      <Visible>False</Visible>\r\n      <ProductName>.NET Framework 3.0 %28x86%29</ProductName>\r\n      <Install>false</Install>\r\n    </BootstrapperPackage>\r\n    <BootstrapperPackage Include=\"Microsoft.Net.Framework.3.5\">\r\n      <Visible>False</Visible>\r\n      <ProductName>.NET Framework 3.5</ProductName>\r\n      <Install>false</Install>\r\n    </BootstrapperPackage>\r\n    <BootstrapperPackage Include=\"Microsoft.Net.Framework.3.5.SP1\">\r\n      <Visible>False</Visible>\r\n      <ProductName>.NET Framework 3.5 SP1</ProductName>\r\n      <Install>false</Install>\r\n    </BootstrapperPackage>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <None Include=\"App.config\">\r\n      <SubType>Designer</SubType>\r\n    </None>\r\n  </ItemGroup>\r\n</Project>\r\n\r\n```"}}
{"actor":{"display_login":"vellozzi"}}