Req #62906 [Com]: [feature request] add support for CURLOPT_*SOCK* options
| From: | sjaillet at gmail dot com | Date: | Sun, 04 Jan 2015 13:15:51 +0000 |
| Subject: | Req #62906 [Com]: [feature request] add support for CURLOPT_*SOCK* options | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-189641@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=62906&edit=1
ID: 62906
Comment by: sjaillet at gmail dot com
Reported by: niki at gorchilov dot com
Summary: [feature request] add support for CURLOPT_*SOCK*
options
Status: Assigned
Type: Feature/Change Request
Package: cURL related
Operating System: All
PHP Version: Irrelevant
Assigned To: laruence
Block user comment: N
Private report: N
New Comment:
Is this still planned or abandoned ?
Previous Comments:
------------------------------------------------------------------------
[2014-08-11 07:30:14] mario at xenji dot com
Are there any news about that? It's been a long time and the branch still is around. Could
anybody please review it?
------------------------------------------------------------------------
[2012-09-07 12:29:54] niki at gorchilov dot com
Any update on this?
------------------------------------------------------------------------
[2012-08-25 21:49:17] pierrick@php.net
A first draft is available here https://github.com/adoy/php-src/commits/curlsock
Laruence if you have some time a code review would be appreciated :)
------------------------------------------------------------------------
[2012-08-24 13:26:49] pierrick@php.net
I'll implement those feature in the master version of curl.
------------------------------------------------------------------------
[2012-08-24 04:49:13] niki at gorchilov dot com
Looked at PHP sources to find how the similar CURLOPT_HEADERFUNCTION has been
implemented and here's my understanding:
- ext/curl/interface.c is the only file that needs modification
- Seems CURLOPT_SOCKOPTDATA, CURLOPT_OPENSOCKETDATA, CURLOPT_CLOSESOCKETDATA
cannot be exported to the end user, as PHP will need it internally to pass a
context to the callback function. No a big deal IMHO.
- remaining three options - CURLOPT_SOCKOPTFUNCTION, CURLOPT_OPENSOCKETFUNCTION,
CURLOPT_CLOSESOCKETFUNCTION shall be added in PHP_MINIT_FUNCTION,
_php_curl_set_default_options and _php_curl_setopt.
- all the three callbacks shall be implemented using curl_write_header as a model.
Hope this helps.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=62906
--
Edit this bug report at https://bugs.php.net/bug.php?id=62906&edit=1