Commit Graph

56 Commits

Author SHA1 Message Date
Zach Borboa cd42a47bd8 Make request duration more accurate 2021-03-13 23:30:24 -05:00
Zach Borboa 3406c09653 Remove unnecessary flush
Message:
    Notice: ob_flush(): Failed to flush buffer. No buffer to flush in
    ./php-curl-class/tests/PHPCurlClass/server.php on line 288
2021-03-13 17:32:53 -05:00
Zach Borboa 976008d094 Implement rate limiting requests via MultiCurl::setRateLimit() 2020-05-16 22:01:15 -07:00
Zach Borboa 9c00119ab5 Improve accuracy of timeout call by using microtime() 2020-05-12 22:41:02 -07:00
Zach Borboa 76ae1241cb Return a json response when calling the timeout test 2020-05-12 10:37:49 -07:00
Zach Borboa ea66e3bfb9 Standardize the use import statements 2020-04-17 18:47:59 -07:00
Zach Borboa f27059b170 Remove notice when request is made and test flag is not set.
Message:
 PHP Notice:  Undefined index: PHP_CURL_CLASS_TEST_MODE_ENABLED in
 ./php-curl-class/tests/PHPCurlClass/server.php on line 4
2019-07-18 19:06:52 -07:00
Zach Borboa c894feda9f Add test cases for the SEARCH method 2019-05-22 23:49:22 -07:00
Zach Borboa 9a538f3a6b Reduce number of ops 2019-05-12 21:13:10 -07:00
Zach Borboa 52a8645872 Clean up 2019-05-11 09:33:01 -07:00
Zach Borboa c36b2af2b0 Fix PHP 5.3 container test not completing successfully 2019-04-30 00:00:39 -07:00
Zach Borboa 7dd4258e02 Fix #562: Prevent direct execution of test server script unless testing 2019-01-05 12:09:03 -08:00
Zach Borboa 5c6fd4cdf3 Fix #555: Remove temporary file when download fails 2018-11-08 08:27:47 -08:00
Zach Borboa b0b0c5f465 Clean up 2017-09-02 02:43:52 -07:00
Zach Borboa 3c3741f891 Implement Curl::setRetry() 2017-08-30 01:36:13 -07:00
Zach Borboa efbcc080bb Allow the disabling of automatic response decoding.
The following will disable their respective decoders:

  $curl->setDefaultDecoder(false);
  $curl->setJsonDecoder(false);
  $curl->setXmlDecoder(false);
2017-04-29 02:54:35 -07:00
Zach Borboa 7e0b477c9f Fix PHP 5.3 syntax error (unexpected T_OBJECT_OPERATOR) 2016-11-10 20:44:02 -08:00
Zach Borboa 5cb05e956a Fix #405: Support resume for Curl::download() 2016-11-10 20:34:18 -08:00
Zach Borboa bfc868fab4 Remove foreach loops 2016-09-24 01:22:44 -07:00
Zach Borboa 126491d8fc Allow requested test to be set via query string parameter 2016-09-24 00:54:38 -07:00
Zach Borboa 363a362bcd Fix #332: Implement Curl::setMaxFilesize() 2016-09-23 01:13:49 -07:00
Zach Borboa 35ac500e03 Improve cookie handling for multicurl requests.
Fix Curl::responseCookies set in headerCallback() being overwritten during multicurl request.
Use rfc cookie encoding when using MultiCurl::setCookie().
Make MultiCurl::responseCookies publicly accessible.
2016-09-04 01:12:06 -07:00
Zach Borboa 39c21041a5 Clean up per PSR2 2016-08-24 00:25:38 -07:00
Zach Borboa a48ec2bfff Check all array values for binary data; Remove JSON_PRETTY_PRINT only supported PHP >= 5.4.0 2016-08-07 01:40:02 -07:00
Zach Borboa a32726bc09 Clean up 2016-08-07 01:37:30 -07:00
Zach Borboa 679ce8e3c4 Fix #345: Allow POSTing multidimensional array with file 2016-08-07 00:04:36 -07:00
Zach Borboa 15efc64824 Add test for Curl::setCookieString 2016-07-17 14:42:55 -07:00
Cyrille Faucheux dc6001688f Support post-redirect-get requests 2016-03-05 13:45:25 +01:00
Zach Borboa 93d088f62b Replace equal comparison operators with identical comparison operators 2016-02-05 19:59:15 -08:00
Zach Borboa 8cf2631c54 Fix #295: Allow setting a custom XML decoder 2016-01-31 04:20:26 -08:00
Zach Borboa 67020c98cc Fix "Array to string conversion/Undefined variable" error in PHP 7 2016-01-16 01:13:22 -08:00
Zach Borboa d69cded020 Fix #254: CaseInsensitiveArray not found. 2015-10-20 21:54:53 -07:00
Pete Watts 9d03d46290 Fix #234 Fixed PATCH request method to correctly support sending body data. 2015-08-20 12:46:32 +01:00
Zach Borboa f10ca99e59 Add test for PATCHing a multidimensional array (#205) 2015-08-20 00:44:28 -07:00
Zach Borboa 7256a716a1 Fix missing body in DELETE tests 2015-04-23 15:44:15 -07:00
Zach Borboa 70be5e4eb3 Fix #171: Allow sending body data in delete() 2015-04-22 01:18:48 -07:00
Zach Borboa bfe5b2fed4 Fix #161: Replace deprecated mime_content_type() with finfo_file() when available 2015-04-01 16:41:50 -07:00
Zach Borboa ecd0831953 Add http digest auth tests 2015-02-22 02:30:35 +07:00
Zach Borboa 7f2a97f57b Implement additional MultiCurl functions available in Curl.
MultiCurl::setBasicAuthentication(), MultiCurl::setCookie(),
MultiCurl::setCookieFile(), MultiCurl::setCookieJar(),
MultiCurl::setJsonDecoder(), MultiCurl::setReferer(), MultiCurl::setReferrer(),
MultiCurl::setTimeout(), MultiCurl::setUserAgent(), MultiCurl::unsetHeader(),
MultiCurl::verbose()
2015-02-16 15:55:57 +07:00
Zach Borboa 7e341b56c4 Fix "Undefined index" errors 2015-02-15 00:36:37 +07:00
Zach Borboa bbdba6d907 Fix #86: Add default timeout of 30 seconds 2015-02-08 23:13:25 +07:00
Zach Borboa 80adf0f3a1 Add json encoding when request header Content-Type is set to application/json 2014-12-31 01:14:18 -08:00
Zach Borboa 2fb88ffde0 Fix "Operation not permitted" (PHP 5.3) and "Permission denied" (HHVM) errors 2014-12-11 21:50:25 -08:00
Zach Borboa 001cfd646b Add CURLOPT_RETURNTRANSFER reset when using download method; Fix download method test failing on PHP 5.3 due to different png files being created on the server and client when using imagepng(). 2014-12-11 21:02:19 -08:00
Zach Borboa 63f47648b0 Fix #98: Implement download() method 2014-12-11 10:20:41 -08:00
Zach Borboa 54a3dd5edc Fix #53: Return response body when calling HTTP request methods 2014-06-24 18:48:36 -07:00
Zach Borboa e5f1dd8bb6 Fix #48: Clean up syntax per PSR2 2014-04-29 16:57:53 -07:00
Zach Borboa aa71e75cea Fix #47: Add http header redirect parsing test 2014-04-28 19:45:36 -07:00
Zach Borboa 7bbed34b16 Use Content-Type header stored in CONTENT_TYPE per RFC 3875
Normalize $_SERVER['CONTENT_TYPE'] with value from $_SERVER['HTTP_CONTENT_TYPE']
2014-04-17 22:14:49 -07:00
Zach Borboa 3656fdfa62 Decode xml responses seamlessly 2014-04-13 15:20:21 -07:00