Title: &quot;cURL error 52: Empty reply from server.&quot;
Last modified: September 1, 2016

---

# "cURL error 52: Empty reply from server."

 *  [HyperTiti](https://wordpress.org/support/users/hypertiti/)
 * (@hypertiti)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/curl-error-52-empty-reply-from-server/)
 * Hello,
 * Since WP4.6, I have this error “cURL error 52: Empty reply from server.” from
   the dashboard when I try to update a network.
 * This happened on different locations (domains). When WordPress is installed in
   network mode (multi-site) , after upgrading themes or plugins, when trying to
   update the network, some site will be correctly updated and often only one site
   will return this error message.
 * Thanks for your help.

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [danhgilmore](https://wordpress.org/support/users/danhgilmore/)
 * (@danhgilmore)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/curl-error-52-empty-reply-from-server/#post-7683320)
 * What version of PHP are you using?
 *  Thread Starter [HyperTiti](https://wordpress.org/support/users/hypertiti/)
 * (@hypertiti)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/curl-error-52-empty-reply-from-server/#post-7683328)
 * Hi Dan,
    Thanks for helping.
 * 3 domains. All of them displayed this error.
 * 1 x PHP 5.6.24
    2 x PHP 5.5.38
 *  [danhgilmore](https://wordpress.org/support/users/danhgilmore/)
 * (@danhgilmore)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/curl-error-52-empty-reply-from-server/#post-7683336)
 * After looking through this, I would check web server logs and/or contact your
   web host to see if they can help.
 *  Thread Starter [HyperTiti](https://wordpress.org/support/users/hypertiti/)
 * (@hypertiti)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/curl-error-52-empty-reply-from-server/#post-7683360)
 * Thanks for your reply.
 * Well, I’m doubting about a hosting issue. No problem so far until yesterday when
   I started updating the websites.
 * I will wait to see if others have the same issue.
 * Thanks.
    Cheers.
 *  [kmessinger](https://wordpress.org/support/users/kmessinger/)
 * (@kmessinger)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/curl-error-52-empty-reply-from-server/#post-7683363)
 * Check the error logs on the server.
 * CURLE_GOT_NOTHING (52)
    Nothing was returned from the server, and under the circumstances,
   getting nothing is considered an error.
 *  [JRGould](https://wordpress.org/support/users/jrgould/)
 * (@jrgould)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/curl-error-52-empty-reply-from-server/#post-8155226)
 * We’ve found this issue to be due to the fact that the Requests class doesn’t 
   explicitly set the “Expect” header which allows cURL to automatically set it 
   to `Expect: 100-continue`. More information on that here: [https://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8.2.3](https://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8.2.3)
 * This seems to cause issues on a small set of servers on the sending side of things
   that causes large POST requests to pretty much any other server that’s otherwise
   set up to respond to them to fail. I’m not sure why this happens, but the fix
   is pretty easy: we just need to explicitly set the “Expect” header before cURL
   can do so automatically. We can do that with the following filter:
 *     ```
       function preempt_expect_header($r) {
       	$r['headers']['Expect'] = '';
       	return $r;
       }
       add_filter( 'http_request_args', 'preempt_expect_header' );
       ```
   
    -  This reply was modified 9 years, 9 months ago by [JRGould](https://wordpress.org/support/users/jrgould/).
 *  [hjort](https://wordpress.org/support/users/hjort/)
 * (@hjort)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/curl-error-52-empty-reply-from-server/#post-8195220)
 * Where should the above function be added ? In order to solve the problem ?
 *  [Isa d'Or](https://wordpress.org/support/users/studio-isidore/)
 * (@studio-isidore)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/curl-error-52-empty-reply-from-server/#post-8236873)
 * Hi there,
 * I am getting a cURL error 6: Could not resolve host: space.dreamtrasher.com
    
   When I have subdomains set to true this error occurs for the subdomain only, 
   while the other site dreamtrasher.com/ and dreamtrasher.com/studiotales is updated
   and can be reached. I have php version 7 (can change this to 5.6 or less, but
   obviously not prefered and not the issue when tested)
 * I would also like to know where to add the code to see if it solves my problem
   🙂
 *  [JS Morisset](https://wordpress.org/support/users/jsmoriss/)
 * (@jsmoriss)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/curl-error-52-empty-reply-from-server/#post-8954981)
 * Awesome. Thanks for the filter – it’s exactly what I was looking for! 🙂
 * js.
    -  This reply was modified 9 years, 2 months ago by [JS Morisset](https://wordpress.org/support/users/jsmoriss/).

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘"cURL error 52: Empty reply from server."’ is closed to new replies.

## Tags

 * [curl](https://wordpress.org/support/topic-tag/curl/)
 * [network](https://wordpress.org/support/topic-tag/network/)
 * [update](https://wordpress.org/support/topic-tag/update/)

 * In: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
 * 9 replies
 * 7 participants
 * Last reply from: [JS Morisset](https://wordpress.org/support/users/jsmoriss/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/curl-error-52-empty-reply-from-server/#post-8954981)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
