Problem/Motivation

As a follow up to #2210637: Upgrade to Guzzle 4 and #2237681: Revise Guzzle client configuration and event registration. In order to fully fix #1991298: Fatal error when installing Drupal on servers that don't have the cURL extension. We have removed the hard dependency on cURL by upgrading to Guzzle 4. However, we still have some curl options in our client class. Which unfortunately means we still have a dependency we don't want.

>
      'config' => array(
        'curl' => array(
          CURLOPT_TIMEOUT => 30,
          CURLOPT_MAXREDIRS => 3,
        ),
      ),
<

Proposed resolution

So, from a Guzzle issue on github, mtdowling said the following:

Setting CURLOPT_MAXREDIRS will have no effect. Guzzle implements its own redirect logic. The redirect logic in Guzzle already has a max redirect setting of 3.

You should use timeout rather than the cURL specific CURLOPT_TIMEOUT settings. Using timeout will ensure that other HTTP adapters utilize the same same timeout settings.

So, we can just remove the MAXREDIRS options, and use the generic 'timeout' option that will then be used by the cURL adapter then needed.

Remaining tasks

change stuff.

User interface changes

N/A

API changes

N/A

CommentFileSizeAuthor
d8.guzzle-curl-options.patch1.04 KBdamiankloip

Comments

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Perfect!

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Looks good.

Committed and pushed to 8.x. Thanks!

  • Commit 9a3772d on 8.x by webchick:
    Issue #2244185 by damiankloip: Remove cURL dependent options from HTTP...
damiankloip’s picture

Great, we now have no curl dependency afaik!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.