Commit Graph

718 Commits

Author SHA1 Message Date
Dmitry Stogov
c1965f58d4 Use reference counting instead of zval duplication 2014-06-05 16:04:11 +04:00
Nikita Popov
3f27d707d2 Use zend_long_to_str in curl
Also use STR_ADDREF instead of maintaining a numeric_key flag.
2014-05-28 18:34:35 +02:00
Dmitry Stogov
066ea2204e Avoid in-place modification 2014-05-28 10:15:15 +04:00
Dmitry Stogov
55b6fb1656 Fixed zend_string/char* mess 2014-05-15 13:44:13 +04:00
Dmitry Stogov
3ba4f8263d Fixed curl_close() behavior 2014-05-13 16:00:44 +04:00
Dmitry Stogov
7fcd4064c0 Merge branch 'master' into phpng
* master: (41 commits)
  fix test - output can be chunked
  fix test
  fix test
  Fixed test for commit 997be125eb
  Add bug fix to NEWS
  Update UPGRADING according to bug fix
  fix test
  improve CURL tests to allow testing without separate server
  improve CURL tests to allow testing without separate server
  Fixed bug #67199	mb_regex_encoding mishmash
  Fix bug #67248 (imageaffinematrixget missing check of parameters)
  Fix bug #67247	spl_fixedarray_resize integer overflow
  fix news
  add tests stuff to README
  Updated NEWS
  Fix Linux specific fail in error traces (cherry-picked and fix for bug #67245) Linux apparently does not like memcpy in overlapping regions...
  - Fixed off-by-one in phar_build (patch by crrodriguez at opensuse dot org)
  - Move checking
  - Fixed missing NULL check in SimpleXMLElement::xpath()
  - Fixed missing NULL check
  ...

Conflicts:
	ext/bz2/bz2.c
	ext/gd/gd.c
	ext/mbstring/php_mbregex.c
	ext/session/tests/031.phpt
	ext/simplexml/simplexml.c
	ext/spl/spl_fixedarray.c
2014-05-13 15:24:40 +04:00
Dmitry Stogov
b8b8c497c4 In most user extensions functions like mysql_close() should use zend_list_close() instead of zend_list_delete(). This closes the actual connection and frees extension specific data structures, but doesn't free zend_reference structure that might be referenced from zval(s). This also doesn't decrement the resource reference counter. 2014-05-13 13:18:00 +04:00
Stanislav Malyshev
2152e2f127 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix test - output can be chunked

Conflicts:
	ext/curl/tests/curl_basic_006.phpt
2014-05-12 10:56:03 -07:00
Stanislav Malyshev
e3ca87265d Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix test - output can be chunked
2014-05-12 10:54:34 -07:00
Stanislav Malyshev
6ef8e0f088 fix test - output can be chunked 2014-05-12 10:54:16 -07:00
Stanislav Malyshev
9c27063a65 fix test 2014-05-12 01:27:18 -07:00
Stanislav Malyshev
89798f57d4 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  improve CURL tests to allow testing without separate server
2014-05-11 23:03:21 -07:00
Stanislav Malyshev
c507c9f01b improve CURL tests to allow testing without separate server 2014-05-11 22:43:08 -07:00
Xinchen Hui
1071bf74cf Finish ext/curl (7 tests fails as trunk) 2014-05-09 14:58:07 +08:00
Xinchen Hui
f4c105dc7d Fixed post data (long type cast matters here :<) 2014-05-09 14:48:39 +08:00
Xinchen Hui
763cee63ab Use zend_string for better performance 2014-05-09 14:14:09 +08:00
Xinchen Hui
2d9bc88db8 Fixed clone refcount 2014-05-09 14:00:47 +08:00
Xinchen Hui
564db38dc4 Fixed build with high version libcurl 2014-05-09 13:54:42 +08:00
Xinchen Hui
c5e63f8a63 Refactoring ext/curl (only compilable now) 2014-05-09 12:17:39 +08:00
Dmitry Stogov
cd4b4dfc4d Merge branch 'master' into refactoring2
Conflicts:
	Zend/zend_hash.c
	ext/date/php_date.c
2014-05-05 13:02:43 +04:00
Michael Wallner
42fbb952d7 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix test locality inconsitency
2014-04-30 13:02:43 +02:00
Michael Wallner
b79301d11f fix test locality inconsitency 2014-04-30 13:01:59 +02:00
Michael Wallner
407612083f Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix bug #64247 (CURLOPT_INFILE doesn't allow reset)
2014-04-30 09:28:21 +02:00
Michael Wallner
54fee59598 fix bug #64247 (CURLOPT_INFILE doesn't allow reset) 2014-04-30 09:27:58 +02:00
Dmitry Stogov
f9927a6c97 Merge mainstream 'master' branch into refactoring
During merge I had to revert:
	Nikita's patch for php_splice() (it probably needs to be applyed again)
	Bob Weinand's patches related to constant expression handling (we need to review them carefully)
	I also reverted all our attempts to support sapi/phpdbg (we didn't test it anyway)

Conflicts:
	Zend/zend.h
	Zend/zend_API.c
	Zend/zend_ast.c
	Zend/zend_compile.c
	Zend/zend_compile.h
	Zend/zend_constants.c
	Zend/zend_exceptions.c
	Zend/zend_execute.c
	Zend/zend_execute.h
	Zend/zend_execute_API.c
	Zend/zend_hash.c
	Zend/zend_highlight.c
	Zend/zend_language_parser.y
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
	Zend/zend_variables.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	ext/date/php_date.c
	ext/dom/documenttype.c
	ext/hash/hash.c
	ext/iconv/iconv.c
	ext/mbstring/tests/zend_multibyte-10.phpt
	ext/mbstring/tests/zend_multibyte-11.phpt
	ext/mbstring/tests/zend_multibyte-12.phpt
	ext/mysql/php_mysql.c
	ext/mysqli/mysqli.c
	ext/mysqlnd/mysqlnd_reverse_api.c
	ext/mysqlnd/php_mysqlnd.c
	ext/opcache/ZendAccelerator.c
	ext/opcache/zend_accelerator_util_funcs.c
	ext/opcache/zend_persist.c
	ext/opcache/zend_persist_calc.c
	ext/pcre/php_pcre.c
	ext/pdo/pdo_dbh.c
	ext/pdo/pdo_stmt.c
	ext/pdo_pgsql/pgsql_driver.c
	ext/pgsql/pgsql.c
	ext/reflection/php_reflection.c
	ext/session/session.c
	ext/spl/spl_array.c
	ext/spl/spl_observer.c
	ext/standard/array.c
	ext/standard/basic_functions.c
	ext/standard/html.c
	ext/standard/mail.c
	ext/standard/php_array.h
	ext/standard/proc_open.c
	ext/standard/streamsfuncs.c
	ext/standard/user_filters.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
	main/php_variables.c
	sapi/phpdbg/phpdbg.c
	sapi/phpdbg/phpdbg_bp.c
	sapi/phpdbg/phpdbg_frame.c
	sapi/phpdbg/phpdbg_help.c
	sapi/phpdbg/phpdbg_list.c
	sapi/phpdbg/phpdbg_print.c
	sapi/phpdbg/phpdbg_prompt.c
2014-04-26 00:32:51 +04:00
Dmitry Stogov
050d7e38ad Cleanup (1-st round) 2014-04-15 15:40:40 +04:00
Stanislav Malyshev
1ef0bd2633 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix #66562: Consistency bug where curl_multi_getcontent behaves different from curl_exec
2014-04-13 18:13:52 -07:00
Stanislav Malyshev
f1206aef70 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix #66562: Consistency bug where curl_multi_getcontent behaves different from curl_exec
2014-04-13 18:13:09 -07:00
Freek
5558d0db9b Fix #66562: Consistency bug where curl_multi_getcontent behaves different from curl_exec
curl_exec returns an empty string when data is received from a domain that returns zero content. curl_multi_getcontent
returned null. Now it returns an empty string fixing the incosistency
2014-04-13 18:12:17 -07:00
Adam Harvey
1a14eb53c4 Merge branch 'PHP-5.5' into PHP-5.6 2014-03-11 11:06:39 -07:00
Adam Harvey
f8252aa537 Fix compile error with theoretically supported versions of libcurl < 7.12.3. 2014-03-11 11:04:26 -07:00
Anatol Belski
af545ead97 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  don't compare constants on run time
2014-02-28 19:39:34 +01:00
Anatol Belski
36c445970e don't compare constants on run time 2014-02-28 19:38:32 +01:00
Tjerk Meesters
cbb2dc0788 Merge branch '5.5' into 5.6
* 5.5:
  Fixed expected output of a few cURL test cases
  Allow NULL as value for CURLOPT_CUSTOMREQUEST option.
2014-02-28 19:01:17 +08:00
Tjerk Meesters
9443fb999d Fixed expected output of a few cURL test cases 2014-02-28 18:59:06 +08:00
datibbaw
488e64dbe4 Allow NULL as value for CURLOPT_CUSTOMREQUEST option.
Added test case.

Refactored the code to isolate the string handling. Fixed return values to use SUCCESS and FAILURE.

Removed unused error variable.

Indentation fix.
Removed the ugly goto.
2014-02-28 18:27:22 +08:00
Chris Wright
afc24da436 Remove cURL close policy related constants
These options don't do anything and they never have.

Refs:
  http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTCLOSEPOLICY
  http://curl.haxx.se/mail/lib-2006-11/0301.html
2014-02-26 17:48:14 +00:00
Daniel Lowrey
a031dc06d9 Add openssl.cafile ini check when loading cainfo 2014-02-25 09:59:13 -07:00
Anatol Belski
5180425ca9 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  adapt test to curl 7.35.0 upgrade
2014-02-05 15:17:30 +01:00
Anatol Belski
fd87b38c47 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  adapt test to curl 7.35.0 upgrade
2014-02-05 15:16:57 +01:00
Anatol Belski
71ebc0a7f3 adapt test to curl 7.35.0 upgrade
which is a security one and should be performed as in
http://curl.haxx.se/docs/adv_20140129.html
2014-02-05 15:15:34 +01:00
Xinchen Hui
c081ce628f Bump year 2014-01-03 11:08:10 +08:00
Xinchen Hui
47c9027772 Bump year 2014-01-03 11:06:16 +08:00
Xinchen Hui
c0d060f5c0 Bump year 2014-01-03 11:04:26 +08:00
Adam Harvey
fba290c061 Allow CURLOPT_FOLLOWLOCATION to be used with open_basedir.
Newer versions of libcurl prevent file:// location response headers by default,
which means that the open_basedir check is unnecessary — the fact
CURLOPT_REDIR_PROTOCOLS can't set CURLPROTO_FILE with open_basedir enabled
means that there's no possibility of breaching the open_basedir restriction,
and this allows HTTP redirects to be followed automatically.

Implements FR #65646 (re-enable CURLOPT_FOLLOWLOCATION with open_basedir or
safe_mode).
2013-09-10 11:42:42 -07:00
Christopher Jones
54d4a28003 Suppress compiler warning "warning: variable ‘length’ set but not used [-Wunused-but-set-variable]" 2013-08-21 15:39:14 -07:00
Christopher Jones
19476f51f2 Merge branch 'PHP-5.5'
* PHP-5.5:
  Reduce (some more) compile noise of 'unused variable' and 'may be used uninitialized' warnings.
  Update NEWS
2013-08-19 17:18:28 -07:00
Christopher Jones
d5979c88ea Reduce (some more) compile noise of 'unused variable' and 'may be used
uninitialized' warnings.
2013-08-19 17:17:54 -07:00
Adam Harvey
2a46fc0470 Merge branch 'PHP-5.5'
* PHP-5.5:
  Track created curl_slist structs by option so they can be updated in situ.

Conflicts:
	ext/curl/interface.c
2013-08-19 12:19:13 -07:00
Adam Harvey
69f12ad582 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Track created curl_slist structs by option so they can be updated in situ.

Conflicts:
	ext/curl/interface.c
2013-08-19 12:16:36 -07:00