The output of the purge requests are written to stdout, resulting in some pages being prepended by Varnish errorpages. This happens for example after commenting or voting.

curl_multi_exec() (purge.inc) writes the output to the screen. Same for curl_exec(). This is not documented in the PHP manual and there does not seem to be an argument available to avoid this. We can however avoid this using output buffering, see the patch attached.

CommentFileSizeAuthor
purge.patch453 bytesmauritsl

Comments

SqyD’s picture

Hi Maurits!

Good find. I was looking for a solution like this for some time. Should clean up the drush output as well... I'll commit this over the coming week.

Thanks!

SqyD’s picture

Status: Needs review » Closed (fixed)

Tested and works great. As expected it also suppresses output when using with drush. That was kinda handy when testing. Maybe I'll introduce an optional debugging option in a future release.

Thanks again Maurits!