The basic authentification doesn't work. I've got a 401 error from the provider.
After having a look, i can see that an issue was created line 244.
The correct line should be :
curl_setopt($download, CURLOPT_USERPWD, $options['username'] . ':' . $options['password']);
and not
curl_setopt($download, CURLOPT_USERPWD, '{' . $options['username'] . '}:{' . $options['password'] . '}');

I thing that the mistake was made when integrating properties into $options...

Cheers,
Cyril

Comments

Cyrilovich created an issue. See original summary.

megachriz’s picture

The conversion happened in #2877125: Refactor http_request_get().

Previously the line was this:
curl_setopt($download, CURLOPT_USERPWD, "{$username}:{$password}");
I see that the curly braces shouldn't been copied over indeed. Its use is explained on http://php.net/manual/en/language.types.string.php#language.types.string....
I missed that as I only use curly braces in strings when I need to print a property of an object: {$object->property}.

megachriz’s picture

Status: Active » Needs review
StatusFileSize
new738 bytes

I provided your suggested change as a patch, so automated tests run against the change.

megachriz’s picture

Now with a test. The test only patch should fail.

The last submitted patch, 4: feeds-http-request-authorize-2918931-4-tests-only.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

  • MegaChriz committed 1b95f99 on 7.x-2.x
    Issue #2918931 by MegaChriz, Cyrilovich: fixed basic authorization...
megachriz’s picture

Status: Needs review » Fixed

Committed #4. Thanks for reporting!

Status: Fixed » Closed (fixed)

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

chankongching’s picture

u gotta run the git clone once before execution of any command to add the remote resources into your know_hosts