Support » Plugin: Varnish HTTP Purge » [Plugin: Varnish HTTP Purge] Error in XMLRPC calls

  • Resolved b3cft

    (@b3cft)


    Hi,

    I had a problem with 1.2.0 when using xmlrpc to update a post that wasn’t in the varnish cache.

    Varnish returned an error in the curl response to purge the page.
    The curl in your extension echo’s the error back to the client, which then gets appended to the client’s xmlrpc response, but invalidates the xml.

    Quick fix. Enable curl return transfer to prevent the echo back to the browser.

    In file varnish-http-purge/varnish-http-purge.php

    protected function purgeUrl($url)
    {
    $c = curl_init($url);
    curl_setopt($c, CURLOPT_CUSTOMREQUEST, 'PURGE');
    curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
    curl_exec($c);
    curl_close($c);
    }

    http://wordpress.org/extend/plugins/varnish-http-purge/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Varnish HTTP Purge] Error in XMLRPC calls’ is closed to new replies.