WordPress.org

Forums

Varnish HTTP Purge
[resolved] Error in XMLRPC calls (2 posts)

  1. b3cft
    Member
    Posted 2 years ago #

    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/

  2. Try version 2.0, we've tweaked that :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Varnish HTTP Purge
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.