Closed (works as designed)
Project:
Mailchimp
Version:
7.x-3.1
Component:
General
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Mar 2012 at 08:48 UTC
Updated:
5 Jun 2015 at 09:46 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
alexverb commentedI'm trying to get Mailchimp.com itself to implement the wrapper. But they aren't really eager to release a new version of the API with this functionality.
This topic explains to you how to add proxy to the MCAPI. http://jungle.mailchimp.com/forum/topics/proxy-support-in-php-api Then all you would have to do is make some settings where you can set the proxy. Doesn't have SSL support though...
Comment #2
wiifmSo it is worth mentioning that since this issue was raised Drupal now has the capacity (in core) to send HTTP requests through proxies. This works fine for HTTP requests, but are more complicated for HTTPS requests.
One option is to tunnel the request through the proxy server, this can be achieved with cURL with the
CURLOPT_HTTPPROXYTUNNELflag.Attached is a patch that ports the request from drupal_http_request() to cURL. Existing proxy configuration is maintained as per what Drupal core expects.
Tested to work with HTTPS endpoints (both through a proxy and with a direct connection).
Looking to hear feedback on this patch, and whether it can be included in mailchimp.
Comment #3
wiifmSorry, had some extra cruft in the patch above, now removed.
Comment #4
wiifmTracking HEAD, patch re-rolled.
Comment #5
wiifmRemove the silly "No error message was found" when clearly there is one.
Comment #6
acbramley commentedWithout this patch, I was not able to get secure results while using a proxy, patch fixed my issues.
Comment #7
acbramley commentedEnhancing this patch to add in proxy authentication support, interdiff attached.
Comment #8
rroblik commentedHello, this post is old but...
What about a patch / release for 7.x-3.x version (MailChimp API library (2.0)) ?
Thanks
Comment #9
rroblik commentedRedraw to new api version
Comment #10
acbramley commentedI can attempt to look into doing that some time in the near future :)
Comment #11
rroblik commented@acbramley It's a good news thanks ! :)
Comment #12
acbramley commentedOk, this is a first, very mundane, straight port of what seems to me will work. I haven't worked with the new mailchimp API nor have I had a chance to test this, but hopefully this is a good starting point.
Comment #13
rroblik commentedWow thanks but without testing there is few errors
undefined
$host(L63
if ($proxy_server && _drupal_http_use_proxy($host)) {)returning
$resultwithout set him ?!Patch cannot be applied with netbeans :(
Comment #14
acbramley commentedWoops, good catchs without applying the patch :)
Here's a less gitty formatted patch with those (hopeful) fixes applied.
Comment #16
rroblik commentedThanks for update ...
Here are my errors :
EDIT :
Why continue executing code if line 106 the test fail ?
here we should return error and stop processing, to prevent others errors related to response / curl (as
curl_getinfo)That what errors are trowed (up)
Regards
Comment #17
acbramley commentedSorry about that, I was meant to return at that point, I believe I started trying to make the return filter right down to the bottom when I first started porting the patch and forgot to add that one back in.
Comment #18
acbramley commentedComment #20
rroblik commentedI have timeout error ...
But maybe because my server local platform (debian, offline) use my development computer proxy (windows, online behind corporate proxy) via CCProxy software ... ?
Noticed when I use
curlwith command line on my debiancurl -x http://my-windows-computer-ccproxy:port -L https://us9.api.mailchimp.com/2.0/lists/subscribeThat is working fine !
Comment #21
rroblik commentedI think the best way of doing this is "simply" to use chr
:)