Adam Harvey
64f85d5afa
Merge branch 'PHP-5.6'
...
* PHP-5.6:
Follow 308 Permanent Redirect responses.
2014-06-12 18:19:11 -07:00
Adam Harvey
84f339546a
Merge branch 'PHP-5.5' into PHP-5.6
...
* PHP-5.5:
Follow 308 Permanent Redirect responses.
2014-06-12 18:17:18 -07:00
Adam Harvey
b51f82f260
Follow 308 Permanent Redirect responses.
...
Fixes bug #67430 (http:// wrapper doesn't follow 308 redirects).
2014-06-12 18:12:53 -07:00
Nikita Popov
ccd9dab4c6
Fix $http_response_header creation
2014-05-29 12:51:03 +02:00
Nikita Popov
dd419d24ca
Replace more convert_to_* calls
2014-04-25 23:21:05 +02:00
Dmitry Stogov
7652a977a8
Use ZEND_FETCH_FOREACH_* macros to iterate over HashTables instead of zend_hash_move_forward() and family.
2014-04-18 19:18:11 +04:00
Dmitry Stogov
6b2ed577fd
Avoid unnecessry reallocations
2014-04-01 22:36:17 +04:00
Dmitry Stogov
887189ca31
Refactored IS_INDIRECT usage for CV and object properties to support HashTable resizing
2014-03-26 18:07:31 +04:00
Dmitry Stogov
aa5f55306b
Refactored EG(active_symbol_table) to be zend_array* instead of HashTable*
2014-03-17 23:15:22 +04:00
Xinchen Hui
93428dc6b9
Refactor base64 to returning zend_string
2014-02-24 18:48:22 +08:00
Xinchen Hui
43b03c74b3
Refacting smart_str
2014-02-18 17:42:46 +08:00
Dmitry Stogov
40e053e7f3
Use better data structures (incomplete)
2014-02-13 17:54:23 +04:00
Xinchen Hui
0f53e37494
Merge branch 'PHP-5.6'
2014-01-03 11:09:07 +08:00
Xinchen Hui
c081ce628f
Bump year
2014-01-03 11:08:10 +08:00
Xinchen Hui
c0d060f5c0
Bump year
2014-01-03 11:04:26 +08:00
Kalle Sommer Nielsen
c83598119b
Kill a TSRMLS_FETCH() in php_stream_context_set() by passing TSRMLS_CC to it
...
# For mysqlnd: Relevant PHP_API_VERSION are put in place for cross version compatibility
2013-12-18 09:19:24 +01:00
Kalle Sommer Nielsen
d14670ccdb
Eliminate another TSRMLS_FETCH() in i_zend_is_true()
...
# Affected extensions have all been updated, ext/opcache and ext/zip
# both have macros for cross version compatibility
2013-12-18 07:25:05 +01:00
Michael Wallner
d29a01de3f
Merge branch 'PHP-5.5'
...
* PHP-5.5:
Fixed bug #61548
Conflicts:
ext/standard/http_fopen_wrapper.c
2013-10-01 11:11:48 +02:00
Michael Wallner
18b04b480e
Fixed bug #61548
2013-10-01 11:07:55 +02:00
Adam Harvey
8983a38d51
Request non-keep-alive connections by default in HTTP 1.1 requests.
...
As noted in FR #65634 , at present we don't send a Connection request header
when the protocol version is set to 1.1, which means that RFC-compliant Web
servers should respond with keep-alive connections. Since there's no way of
reusing the HTTP connection at present, this simply means that PHP will appear
to hang until the remote server hits its connection timeout, which may be quite
some time.
This commit sends a "Connection: close" header by default when HTTP 1.1 (or
later) is requested by the user via the context options. It can be overridden
by specifying a Connection header in the context options. It isn't possible to
disable sending of the Connection header, but given "Connection: keep-alive" is
the same as the default HTTP 1.1 behaviour, I don't see this as a significant
issue — users who want to opt in for that still can.
As a note, although I've removed an efree(protocol_version), this doesn't
result in a memory leak: protocol_version is freed in the out: block at the end
of the function anyway, and there are no returns between the removed efree()
and the later call. Yes, I ran the tests with valgrind to check that. ☺
Implements FR #65634 (HTTP wrapper is very slow with protocol_version 1.1).
2013-09-11 14:11:29 -07:00
Andrey Hristov
92d27ccb05
Constify streams API and a few other calls down the rabbit hole.
...
(`char *` to `const char *` for parameters and few return values)
In a few places int len moved to size_t len.
2013-07-30 12:49:36 +02:00
Sergey Akbarov
1d4fcdff9f
Fix bug #64433 : does not follow redirects for non-3xx response codes
2013-03-30 21:22:30 -07:00
Stanislav Malyshev
5382e156f9
Fix bug #62524 , only follow redirects in file streams for 3xx HTTP statuses
2013-01-29 00:27:35 -08:00
Xinchen Hui
0a7395e009
Happy New Year
2013-01-01 16:28:54 +08:00
Felipe Pena
4e19825281
- Year++
2012-01-01 13:15:04 +00:00
Gustavo André dos Santos Lopes
f24f2b4df6
- Fixed bug #60570 (http wrapper leaks context resource if request fails/is
...
redirected).
2011-12-21 15:44:58 +00:00
Antony Dovgal
50f5c1e9b2
bail out if reading HTTP headers failed
2011-11-08 14:12:37 +00:00
Xinchen Hui
64fc565765
Avoiding strcpy, strcat, sprintf usage to make static analyzer happy
2011-08-09 12:16:58 +00:00
Ilia Alshanetsky
d2b11712ff
Fixed bug #54137 (file_get_contents POST request sends additional line break).
2011-05-29 09:23:08 +00:00
Dmitry Stogov
aa5055ba0f
Added ability to connect to HTTPS sites through proxy with basic authentication using stream_context/http/header/Proxy-Authorization
2011-01-28 10:33:47 +00:00
Ilia Alshanetsky
a6a4751a88
Fixed variable re-declaration
2011-01-12 13:21:27 +00:00
Felipe Pena
0203cc3d44
- Year++
2011-01-01 02:17:06 +00:00
Gustavo André dos Santos Lopes
5c09767d4b
- Fixed bug #53198 (changing INI setting "from" with ini_set did not have any
...
effect)
#Made "from" a proper INI setting and bound it to a global variable.
#Previously, it was simply read from the hash table with the parsed ini file
#by using cfg_get_string (I wonder why this mechanism still exists...)
2010-10-29 15:29:15 +00:00
Pierre Joye
4cda8a7797
-fix logic (and BC break)
2010-08-23 18:05:05 +00:00
Pierre Joye
a0e223b8ba
- add follow_location support for http stream, enabled by default to keep BC. Allows one to ignore the location header, w/o having to ignore errors or other tricks, the location data is however still available (meta)
2010-08-23 16:54:57 +00:00
Pierre Joye
7bd81da0b5
- WS
2010-08-16 10:29:01 +00:00
Kalle Sommer Nielsen
dd8e59da8f
Removed safe_mode
...
* Removed ini options, safe_mode*
* Removed --enable-safe-mode --with-exec-dir configure options on Unix
* Updated extensions, SAPI's and core
* php_get_current_user() is now declared in main.c, thrus no need to include safe_mode.h anymore
2010-04-26 23:53:30 +00:00
Jani Taskinen
5952473b7a
- Fixed bug #50832 (HTTP fopen wrapper does not support passwordless HTTP authentication)
2010-01-25 16:28:13 +00:00
Sebastian Bergmann
9ba1e81665
sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php
2010-01-03 09:23:27 +00:00
Ilia Alshanetsky
d56c1fdf14
Fixed bug #50451 (http wrapper breaks on 2048 char long headers)
...
# Improvement on the fix for bug #49851
2009-12-13 15:44:22 +00:00
Ilia Alshanetsky
47b3371122
Fixed bug #49851 (http wrapper breaks on 1024 char long headers).
2009-12-10 03:23:05 +00:00
Felipe Pena
f61a06350a
- Switching to TSRMLS_FETCH version
2009-11-16 10:36:27 +00:00
Felipe Pena
5411bb32a8
- Fixed bug #49936 (crash with ftp stream in php_stream_context_get_option())
...
(patch by Pierrick)
2009-11-15 20:30:57 +00:00
Antony Dovgal
307a2259e9
fix memleak and possible segfault in HTTP fopen wrapper
2009-08-04 09:24:48 +00:00
Jani Taskinen
be6338014a
- Fixed bug #43510 (stream_get_meta_data() does not return same mode as used in fopen)
2009-08-01 03:17:31 +00:00
Jani Taskinen
c0aab038ba
Fixed bug #48929 (Double \r\n after HTTP headers when "header" context option is an array)
2009-07-20 10:54:37 +00:00
Arnaud Le Blanc
a5db3627e5
Fixed bug #38802 (max_redirects and ignore_errors)
...
(patch by datibbaw@php.net )
2009-05-16 20:34:48 +00:00
Greg Beaver
7aabee2ec6
MFH: fix potential free of NULL
2009-05-14 13:36:56 +00:00
Jani Taskinen
0b4875313a
MFH: - Fixed Bug #45092header HTTP context option not being used (--with-curlwrappers)
2009-05-05 00:31:56 +00:00
Jani Taskinen
6611eb0b98
- Sync with HEAD
2009-05-05 00:16:21 +00:00