Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#38226 closed defect (bug) (fixed)

"cURL error 23: Failed writing body" when updating plugins or themes

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: dd32's profile dd32
Milestone: 4.7.1 Priority: normal
Severity: normal Version: 4.6
Component: HTTP API Keywords: has-patch commit
Focuses: Cc:

Description

After upgrading to 4.6, some users reported an error when upgrading plugins or themes:

Download failed. cURL error 23: Failed writing body (624 != 811)

Apparently it happens if mbstring.func_overload is enabled and body length is calculated incorrectly.

Previously, this was solved by using mbstring_binary_safe_encoding()/reset_mbstring_encoding(), see [25348].

However, [37428] removed those calls, and it seems like Requests is not mbstring-aware.

Attachments (1)

38226.patch (847 bytes) - added by SergeyBiryukov 8 years ago.

Download all attachments as: .zip

Change History (10)

#1 @SergeyBiryukov
8 years ago

38226.patch restores mbstring_binary_safe_encoding()/reset_mbstring_encoding() calls.

Needs testing on the affected installs.

Last edited 8 years ago by SergeyBiryukov (previous) (diff)

#2 @dd32
8 years ago

  • Component changed from Upgrade/Install to HTTP API

#4 @SergeyBiryukov
8 years ago

Got at least one report that the patch does resolve the issue.

Found another thread on the English forums, commented there:
https://wordpress.org/support/topic/after-update-to-46-keep-getting-curl-error-23/page/2/#post-8157376

This ticket was mentioned in Slack in #forums by yui. View the logs.


8 years ago

#7 @SergeyBiryukov
8 years ago

  • Keywords commit added; needs-testing removed

#8 @dd32
8 years ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from new to closed

In 38894:

HTTP: Call mbstring_binary_safe_encoding() before making a request with Requests to avoid issues with mbstring.func_overload.

Props SergeyBiryukov.
Fixes #38226.

#9 @dd32
8 years ago

In 38895:

HTTP: Call mbstring_binary_safe_encoding() before making a request with Requests to avoid issues with mbstring.func_overload.

Props SergeyBiryukov.
Merges [38894] to the 4.6 branch.
Fixes #38226.

Note: See TracTickets for help on using tickets.