[wp-trac] [WordPress Trac] #31232: Invalid value for curl option CURLOPT_PROXYAUTH in wp-includes/class-http.php
WordPress Trac
noreply at wordpress.org
Thu Feb 5 09:41:57 UTC 2015
#31232: Invalid value for curl option CURLOPT_PROXYAUTH in wp-includes/class-
http.php
-------------------------------+------------------------------
Reporter: beier.michael | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: HTTP API | Version: 4.1
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Comment (by dd32):
After looking at the PHP source, and the cURL source, It looks like my
original interpretation of the docs is correct, either should be able to
be used, and since these are just plain bitmasks, they're designed to be
interoperable.
https://github.com/bagder/curl/blob/0b1f37e77cc091456f32a8258a261b5a790ebf46/include/curl/curl.h#L624-L652
What kind of Proxy server are you connecting to, and what authorization
method does it use? Basic or NTLM?
What version of cURL are you using with PHP 5.5.17? (get the cURL version
from phpinfo(), not CLI) and is it a 32bit or 64bit build of PHP?
Looking at the constants in PHP, passing `CURLAUTH_ANY` or `CURLAUTH_BASIC
| CURLAUTH_NTLM` definitely matches the same bitmasks, ideally we'd
continue to use `CURLAUTH_ANY` to support future cURL proxy authentication
methods (Although the Streams WP_HTTP Method only handles Basic..)
{{{
echo decbin( CONSTANT_NAME );
0001 CURLAUTH_BASIC (1)
1000 CURLAUTH_NTLM (8)
1001 CURLAUTH_BASIC | CURLAUTH_NTLM (9)
1111 CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE |
CURLAUTH_NTLM (15)
111111111111111111111111111111111111111111111111111111111110 1111
CURLAUTH_ANY (-17)
111111111111111111111111111111111111111111111111111111111110 1110
CURLAUTH_ANYSAFE (-18)
}}}
I've also just tested WP_HTTP with both a BASIC and a NTLM proxy using
`CURLAUTH_ANY`, and both receive an appropriate `Proxy-Authorization`
header.. So I'm really not sure why it's not working for you.
Tested With PHP 5.5.21 / cURL 7.19.7 / 64bit
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31232#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list