GoogleCloudPlatform / google-cloud-powershell

PowerShell cmdlets for the Google Cloud Platform
http://googlecloudplatform.github.io/google-cloud-powershell/
Apache License 2.0
135 stars 61 forks source link

Fix a bug where Get-GceMetadata fails when called the second times #608

Closed quoctruong closed 6 years ago

quoctruong commented 6 years ago

The bug happens because we keep adding headers to the DefaultRequestHeaders of a static HttpClient. This means that by the second time this is called, the header will be something like "Metadata-Flavor" = {"Google", "Google" } instead of "Metadata-Flavor" = "Google".

quoctruong commented 6 years ago

Thanks!