Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#37839 closed defect (bug) (fixed)

wp_remote_get sometimes mutilates the response body

Reported by: stephenharris's profile stephenharris Owned by: rmccue's profile rmccue
Milestone: 4.7.1 Priority: normal
Severity: normal Version: 4.6
Component: HTTP API Keywords:
Focuses: Cc:

Description

This happens when the HTTP header claims the body is chunk encoded when it is actual fact not, AND the body appears chunked correctly (although it isn't).

The underlying issue (apart from a lying a HTTP header) is the Requests library is not recognising that the chunk encoding is not valid. This has been reported upstream: https://github.com/rmccue/Requests/pull/236, this issue has been opened to track the issue here.

The symptom of the issue is that wp_remote_get() will sometimes return a response with lines removed from the body (mistaken as chunk headers).

Change History (7)

#1 @swissspidy
8 years ago

  • Milestone changed from Awaiting Review to Future Release

Can change milestone to 4.7 once the PR has been merged upstream.

#2 @stephenharris
8 years ago

#37918 was marked as a duplicate.

#3 follow-up: @rmccue
8 years ago

  • Milestone changed from Future Release to 4.7
  • Owner set to rmccue
  • Status changed from new to assigned

PR merged; needs update in core.

#4 in reply to: ↑ 3 @tastenchris
8 years ago

Replying to rmccue:

PR merged; needs update in core.

Is it possible to get a patch for 4.6.1 to fix this bug until 4.7 arrives (in december 2016)?

#5 @dd32
8 years ago

  • Milestone changed from 4.7 to 4.6.2

Yep, this will be merged to the next 4.6.x release.

#6 @dd32
8 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 38727:

HTTP: Update Requests to master (0048f3c) which fixes a number of outstanding issues.

Fixes #38070, #37733 by reverting part of [38429] and using the fix in Requests.
Fixes #37992 allowing for connecting to SSL resources on ports other than 443.
Fixes #37991 by not sending default ports in the Host: header.
Fixes #37839 to match and decode Chunked responses correctly.
Fixes #38232 allowing a SSL connection to ignore the hostname of the certificate when verification is disabled.

#7 @dd32
8 years ago

In 38728:

HTTP: Update Requests to master (0048f3c) which fixes a number of outstanding issues.

Merges [38727] to the 4.6 branch.

Fixes #38070, #37733 by reverting part of [38429] and using the fix in Requests.
Fixes #37992 allowing for connecting to SSL resources on ports other than 443.
Fixes #37991 by not sending default ports in the Host: header.
Fixes #37839 to match and decode Chunked responses correctly.
Fixes #38232 allowing a SSL connection to ignore the hostname of the certificate when verification is disabled.

Note: See TracTickets for help on using tickets.