At first upgrading to the latest dev for 6.x fixed the curl request when testing on a non Acquia environment, but when ran again on Acquia other problems began to present themselves. Looking into this at the moment, will post a patch in a few minutes. The immediate problem seems to be a malformed url in conjunction with the gzip header causing unexpected behavior from varnish.
[edit:] With the gzip header included the script would receive a 200 purged response from varnish. But when checking the content from an anonymous offsite source the cached page would still be served. Further purge requests to the same content, still including the gzip header, result in a 404 not cached response. When the gzip header is removed and another purge request sent the response becomes 200 purged. This time the content is no longer cached when accessing from an offsite anonymous source. I don't understand why.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | purge-remove_gzip_header_and_prepend_host_to_url_for_acquia-1712340.patch | 1.14 KB | delphian |
Comments
Comment #1
delphian commentedHere is the patch made against the latest 6.x dev version. This is what was required to get varnish to purge for me. Please provide feedback if there is a better solution than this patch (such as an obvious configuration mistake). Thanks!
Comment #2
delphian commentedThe removal of the gzip header in the comment #1 patch may be a mistake. I'm waiting for some information back from Acquia at the moment to confirm. It appears the a purge command does not purge all variants. Meaning that if you send the purge request with "Accept-Encoding: gzip" header, only requests of that variant will be purged (most browsers send this). My original tests using curl -I was throwing me off as this header is not included, and thus nothing looked to be purged. I will post again soon as I find out from Acquia if there is any way to purge all variants.
Prepending the $proxy_url_base (done in the patch), but retaining the gzip header (removed in the patch) gives expected results when testing with: curl -I {url} --header "Accept-Encoding: gzip" --header "X-Acquia-Purge:x"
Comment #3
scothiam commentedHi delphian, did you hear anything back from Acquia... tried the patch with and without the gzip line mod, no dice. Let me know if you have new ideas that need testing. cheers,
Comment #4
scothiam commentedPS, I've taken the changes in the D7 patch here and applied them to to Purge 6.x-1.5-rc and I am off to the races. I've pasted this below while I figure out how to supply a proper patch... they're looking for a patch in the thread linked as well, if someone beats me to it
purge.inc (snippet)
Comment #5
SqyD commented@scothiam & @delphian If you're working on a D6 version of another bug #1551232: $proxy_url_base is not set when using "ah" purge method I would prefer to flag this as a duplicate and join effords on the existing issue. Agreed?
Comment #5.0
SqyD commentedProviding additional information in the bug report.