Needs review
Project:
Cache Warmer
Version:
7.x-4.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
4 Apr 2012 at 23:48 UTC
Updated:
14 Oct 2013 at 13:41 UTC
Jump to comment: Most recent file
Great module. I needed to be able to selectively warm the cache with specifically set headers, e.g. for different mobile caches
I added an additional command line switch to allow setting/overriding the CURL initialization parameters
--add-curl-params="my_overrides.php"
The additional curl params should be in this form:
function cache_warmer_get_additional_curl_params() {
return array(
CURLOPT_USERAGENT => 'iPad',
);
}
This is all tested and working great. Please consider rolling into this module.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | add_curl_param_overrides-1515790-3.patch | 2.11 KB | beebop_cj |
| #1 | add_curl_param_overrides-1515790-2.patch | 15.23 KB | craigmc |
Comments
Comment #1
craigmc commentedPatch file attached here.
Comment #2
beebop_cj commentedHey Craig.
I've been having a similar issue in which I needed to cache https pages but we have only self signed certificates on our test environments. Therefore it required a new curl option: CURLOPT_SSL_VERIFYPEER => FALSE.
The idea I had was to create a hook and each hook would return an array of cURL parameters.
The code comes right after the basic options definition:
Here is the code:
A hook implementation would look like this:
Will post the patch (maybe it's helpful for someone) in the next comment for consistency with comment-patch numbering (#2 was taken).
Cheers,
Marius
Comment #3
beebop_cj commentedPosted the patch.
Marius