Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#37839 closed defect (bug) (fixed)

wp_remote_get sometimes mutilates the response body

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

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
10 years ago

  • Milestone Awaiting Review → Future Release

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

#2 @stephenharris
10 years ago

#37918 was marked as a duplicate.

#3 follow-up: @rmccue
10 years ago

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

PR merged; needs update in core.

#4 in reply to: ↑ 3 @tastenchris
10 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
10 years ago

  • Milestone 4.7 → 4.6.2

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

#6 @dd32
10 years ago

  • Resolution → fixed
  • Status assigned → 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
10 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.