You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Curl >= 7.80.0 supports declaring a function for `CURLOPT_PREREQFUNCTION` option
that gets called after Curl establishes a connection (including the TLS handshake
for HTTPS connections), but before the actual request is made.
The callable must return either `CURL_PREREQFUNC_OK` or `CURL_PREREQFUNC_ABORT` to
allow or abort the request.
This adds support for it to PHP with required ifdef.
- libc: https://curl.se/libcurl/c/CURLOPT_PREREQFUNCTION.html
string(41) "operation aborted by pre-request callback"
122
+
int(42)
123
+
124
+
Testing with CURL_PREREQFUNC_OK
125
+
string(8) "callback"
126
+
int(5)
127
+
string(10) "CurlHandle"
128
+
bool(true)
129
+
bool(true)
130
+
bool(true)
131
+
bool(true)
132
+
string(0) ""
133
+
string(0) ""
134
+
int(0)
135
+
136
+
Testing with no return type
137
+
The CURLOPT_PREREQFUNCTION callback must return either CURL_PREREQFUNC_OK or CURL_PREREQFUNC_ABORT
138
+
139
+
Testing with invalid type
140
+
The CURLOPT_PREREQFUNCTION callback must return either CURL_PREREQFUNC_OK or CURL_PREREQFUNC_ABORT
141
+
142
+
Testing with invalid value
143
+
The CURLOPT_PREREQFUNCTION callback must return either CURL_PREREQFUNC_OK or CURL_PREREQFUNC_ABORT
144
+
145
+
Testing with invalid option value
146
+
curl_setopt(): Argument #3 ($value) must be a valid callback for option CURLOPT_PREREQFUNCTION, no array or string given
147
+
148
+
Testing with invalid option callback
149
+
curl_setopt(): Argument #3 ($value) must be a valid callback for option CURLOPT_PREREQFUNCTION, function "function_does_not_exist" not found or invalid function name
0 commit comments