Skip to content

Invoke-WebRequest does not support -TransferEncoding deflate #1753

Closed

Description

PS D:> Invoke-WebRequest http://httpbin.org/deflate
Invoke-WebRequest : Block length does not match with its complement.
At line:1 char:1
- Invoke-WebRequest http://httpbin.org/deflate
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  - CategoryInfo          : NotSpecified: (:) [Invoke-WebRequest], InvalidDataException
  - FullyQualifiedErrorId : System.IO.InvalidDataException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Expected:
{
  "deflated": true, 
  "headers": {
    "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,_/_;q=0.8", 
    "Accept-Encoding": "gzip, deflate, sdch", 
    "Accept-Language": "en-US,en;q=0.8", 
    "Cookie": "_ga=GA1.2.1281286921.1466206728", 
    "Host": "httpbin.org", 
    "Referer": "http://httpbin.org/", 
    "Upgrade-Insecure-Requests": "1", 
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
  }, 
  "method": "GET", 
  "origin": "131.107.159.201"
}

Activity

  1. SteveL-MSFT commented on Sep 29, 2016

    @SteveL-MSFT
    MemberAuthor

    TFS:7976639

  2. added
    Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributors
    on Sep 29, 2016
  3. added this to the milestone on Feb 28, 2017
  4. modified the milestones: , 6.0.0-beta1 on Mar 18, 2017
  5. modified the milestones: , on May 15, 2017
  6. joeyaiello commented on May 23, 2017

    @joeyaiello
    Contributor

    While this is the older issue, given that there's more context in #3178, I'm going to close this one as a dupe. Adding the TFS trackback there as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Resolution-DuplicateThe issue is a duplicate.Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdletsgeneral cmdlet issues

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions