Ilia Alshanetsky
a33d64e7b6
Fixed bug #36857 (Added support for partial content fetching to the HTTP
...
streams wrapper).
2006-03-26 17:12:05 +00:00
Ilia Alshanetsky
0621bcc9e1
Allow get_headers() to return header information even for non-200 responses.
2006-01-20 01:40:32 +00:00
foobar
5bd93221a8
bump year and license version
2006-01-01 12:51:34 +00:00
Ilia Alshanetsky
a74463e9bd
Fixed bug #35629 (crash in http:// wrapper on multiple redirects).
2005-12-12 05:04:15 +00:00
Antony Dovgal
ca42324497
php_stream_get_line() is a macro and it already has TSRMLS_CC
2005-12-09 18:53:09 +00:00
Ilia Alshanetsky
644cf05505
Fixed bug #34359 (Possible crash inside fopen http wrapper).
2005-12-08 02:53:08 +00:00
Sara Golemon
2b059ae91f
MFH: (r-1.104)
2005-12-06 19:15:41 +00:00
Ilia Alshanetsky
c4da6009bb
MFH: Fixed possible crash in http:// wrapper.
2005-11-15 14:46:34 +00:00
Dmitry Stogov
0988162649
Fixed memory corruption
2005-09-21 15:55:07 +00:00
Dmitry Stogov
3d41ebf595
Allow fopen() make HTTPS requests throug HTTP proxies
2005-09-21 15:04:26 +00:00
foobar
23e671a51e
- Bumber up year
2005-08-03 14:08:58 +00:00
Ilia Alshanetsky
6be7584eba
Properly recognize redirect code 303.
...
When encountering redirect on POST request follow browsers and cURL and
perform GET on the specified location field.
2005-07-14 14:59:16 +00:00
Derick Rethans
c6ae4a98be
- Fixed bug #33242 (Mangled error message when stream fails).
2005-06-06 12:39:57 +00:00
Ilia Alshanetsky
3ae10919c4
Added max_redirects context option that specifies how many HTTP redirects
...
to follow.
2005-05-06 02:31:07 +00:00
Ilia Alshanetsky
b874c94d81
Missing bit from previous patch.
2005-05-06 02:20:00 +00:00
Ilia Alshanetsky
a63f5d1c3f
Fixed bug #32936 (http redirects URLs are not checked for control chars).
2005-05-06 02:13:46 +00:00
Anantha Kesari H Y
549ec65eee
removed redundant NEW_LIBC checks
2004-09-27 15:55:04 +00:00
Sara Golemon
532a79aa52
*** empty log message ***
2004-09-08 23:37:55 +00:00
Sara Golemon
92c4a37a6a
Chunk Length may optionally be followed by whitespace
2004-09-07 22:46:24 +00:00
Sara Golemon
a85bff9796
Protocol version context option and chunked transfer encoding
2004-09-07 19:27:11 +00:00
Sara Golemon
93f795bb9e
Add proxy support to ftp using http wrapper
2004-07-24 04:01:48 +00:00
Stefan Esser
23813d603c
Fixed off-by-one in http_fopen_wrapper
2004-05-28 13:38:06 +00:00
Sara Golemon
d5e0742e8d
In-HEAD bugfix# 28115
2004-04-23 03:37:20 +00:00
Ilia Alshanetsky
d45b2c6bc3
MFH: Fixed bug #27628 (Simplify the process of making a POST request via
...
stream context).
2004-03-19 15:41:26 +00:00
foobar
639073bd2a
MFB: typofix
2004-02-26 00:13:30 +00:00
Ilia Alshanetsky
0f5f7c6dd0
Handle situation where feof() occurs before the HTTP header is retrieved.
2004-02-26 00:02:27 +00:00
Sebastian Bergmann
184b379fd7
ZTS fix.
2004-02-25 09:36:46 +00:00
Ilia Alshanetsky
895f244236
Fixed bug #27383 (Potential crash inside fopen_wrapper, while parsing
...
response code).
2004-02-24 21:52:40 +00:00
Sara Golemon
18588497d7
Fix potential bug in http:// proxy support.
...
Some proxy servers require entire URI be sent in request string.
Add context option "http"/"request_fulluri" to allow this behavior.
2004-01-30 00:24:18 +00:00
Andi Gutmans
dbeb4158d2
- A belated happy holidays and PHP 5
2004-01-08 08:18:22 +00:00
Sara Golemon
c56647833b
Route mkdir()/rmdir() via wrapper ops.
...
Move current rmdir()/rmdir() code to plain_wrappers.c
Implement mkdir()/rmdir() in ftp:// wrapper
2003-12-13 04:07:18 +00:00
Sara Golemon
b1f8236b63
Route rename() via wrapper ops.
...
Move current rename() code to main/streams/plain_wrapper.c
Implement ftp/rename()
Implement userstreams/rename()
2003-12-12 23:06:42 +00:00
Sara Golemon
5ad67a9215
Add http proxy support via context option.
2003-12-03 05:30:16 +00:00
Sascha Schumann
6a7dde29e7
kill warnings
2003-08-28 16:28:33 +00:00
Sara Golemon
82ddb23338
Loosen restrictions on method used with http_fopen_wrapper, still default to GET though.
2003-06-13 19:27:26 +00:00
James Cox
f68c7ff249
updating license information in the headers.
2003-06-10 20:04:29 +00:00
Sara Golemon
5126fbe556
Setup unlink() method in wrapper_ops structure, implement unlink in plainfiles wrapper, explicitly set method NULL in other wrappers (for now), and rewrite unlink userland function to call into wrapper_ops
2003-05-14 06:10:04 +00:00
Wez Furlong
169b3f72ed
Fix for #23340 ; fopen on multiple urls from the same server crashes.
2003-04-28 14:41:36 +00:00
Ilia Alshanetsky
3d6fccc08c
Fixed bug #23152 ($http_response_header empty on invalid URLs)
2003-04-14 13:55:34 +00:00
Sara Golemon
70155b6dcf
Introduce support for context options 'method', 'header', 'content'
2003-04-07 21:02:04 +00:00
Ilia Alshanetsky
53530765ff
Added support for http redirects to ftp.
...
Fixed bug #22508 (Added protection against circular HTML redirects).
2003-03-04 16:04:05 +00:00
Wez Furlong
76ebaa6ee7
- Move https:// and ftps:// wrapper registration into the openssl module.
...
- Expose the http:// and ftp:// wrappers as PHPAPI
- Remove unused variables
2003-02-27 18:16:35 +00:00
Wez Furlong
fd61f69077
Another big commit (tm).
...
Main Changes:
- Implement a socket transport layer for use by all code that needs to open
some kind of "special" socket for network or IPC.
- Extensions can register (and override) transports.
- Implement ftruncate() on streams via the ioctl-alike option interface.
- Implement mmap() on streams via the ioctl-alike option interface.
- Implement generic crypto API via the ioctl-alike option interface.
(currently only supports OpenSSL, but could support other SSL toolkits,
and other crypto transport protocols).
Impact:
- tcp sockets can be overloaded by the openssl capable sockets at runtime,
removing the link-time requirement for ssl:// and https:// sockets and
streams.
- checking stream types using PHP_STREAM_IS_SOCKET is deprecated, since
there are now a range of possible socket-type streams.
Working towards:
- socket servers using the new transport layer
- mmap support under win32
- Cleaner code.
# I will be updating the win32 build to add the new files shortly
# after this commit.
2003-02-27 17:43:38 +00:00
Ilia Alshanetsky
69094da0e8
Revert accidental commit.
2003-02-20 00:34:03 +00:00
Ilia Alshanetsky
3bff5c0419
Fixed bug #22308 (optimized passthru, code is now ~40 times faster).
2003-02-20 00:32:51 +00:00
Ilia Alshanetsky
a6ef609a37
Fixed bug #22283 (possible crash when opening relative URLs).
2003-02-19 00:49:31 +00:00
Zeev Suraski
4934744b93
Win32 build improvements
2003-02-17 13:29:59 +00:00
Wez Furlong
0a18a9d744
A add much more useful select(2) implementation than is provided by
...
windows sockets. The winsock implementation will only work with sockets;
our implementation works with sockets and file descriptors.
By association, stream_select() will now operate correctly with files, pipes and sockets.
This change required linking against the winsock2 library. In terms of
compatibility, only older versions of windows 95 do not have winsock2
installed by default. It is available as a redistributable file, and is most likely installed by any OS patches (eg: Internet Explorer) applied by the user.
Also, add a win32 compatible pipe test when opening a stream from a pipe. This test will only work on NT, win2k and XP platforms. Without this test, interleaved fread() and select() calls would cause the read buffer to be clobbered. I will be working on a fix for this issue for win9x.
2003-02-16 03:48:49 +00:00
Ilia Alshanetsky
f8eba6ded2
Added 'x' mode for fopen() used on local files. This mode will create a new
...
file only if a file does not already exist (O_CREAT|O_EXCL).
2003-02-13 14:40:17 +00:00
Wez Furlong
1c3de808b9
Avoid problems with chunk_size and auto_detect_line_endings.
2003-02-13 13:38:20 +00:00
Sara Golemon
3631b28f44
chunk_size should always be reduced to 1 while scanning response headers to avoid buffering the actual stream prior to any read calls.
2003-02-07 23:44:58 +00:00
Ilia Alshanetsky
71ab7dfccc
Fixed a memory leak that occurs if the location specified by redirect header
...
cannot be opened.
2003-01-03 17:12:35 +00:00
Ilia Alshanetsky
c52cdad25a
Further fixes related to bug #21267 .
2003-01-03 17:05:16 +00:00
Sebastian Bergmann
b506f5c8f8
Bump year.
2002-12-31 16:08:15 +00:00
Ilia Alshanetsky
88d26985b8
Fixed bug #21267 (opening URLs that result in redirection to a relative
...
path was failing).
2002-12-29 20:01:33 +00:00
Marcus Boerger
49a99a98f4
-php_error -> php_error_docref
...
-removed some cases where emalloc result was tested
2002-12-05 20:59:49 +00:00
Wez Furlong
3a8c49afc1
Make PHP follow 301 correctly.
...
# There may be other cases that need handling properly; I'll have to spend
# some time investigating why we even need special cases now; it's got
# something to do with Ilia's patch to fix memory leaks.
2002-10-13 01:03:43 +00:00
Wez Furlong
7694770304
Rename streams functions to fit with naming conventions, adding aliases
...
for old functions where required.
Make use of recent changes to chunk size and timeout setting code.
2002-09-28 22:14:21 +00:00
Wez Furlong
4c2a9c091b
Remove an unused variable and a now-unused function.
2002-09-26 10:17:41 +00:00
Wez Furlong
3a67c67737
Rename file_get_wrapper_data -> file_get_meta_data.
...
It now always returns useful information for all streams.
Unified that data with socket_get_status and made socket_get_status
an alias for file_get_meta_data.
Fix Location header following which was broken in this commit:
http://cvs.php.net/diff.php/php4/ext/standard/http_fopen_wrapper.c?r1=1.41&r2=1.42&ty=h
2002-09-26 10:14:41 +00:00
Wez Furlong
c74b9faca5
Implement a default_socket_timeout and auto_detect_line_endings ini options.
...
Also move user_agent from BG to FG.
2002-09-23 18:12:39 +00:00
Wez Furlong
4d8a07d529
Implement read buffering in streams.
...
Eliminate similar code from network.c.
Implement fgets equivalent at the streams level, which can detect
the mac, dos and unix line endings and handle them appropriately.
The default behaviour is unix (and dos) line endings.
An ini option to control this behaviour will follow.
# Don't forget to make clean!
# I've done some testing but would appreciate feedback from
# people with scripts/extensions that seek around a lot.
2002-09-23 01:47:04 +00:00
Jan Lehnardt
53b0623878
- fix typo in comment
2002-09-14 12:09:47 +00:00
Ilia Alshanetsky
407088509f
Added a check to ensure user_agent header is not sent if user_agent value
...
if blank.
2002-09-07 21:57:11 +00:00
Wez Furlong
3df412cf9b
Fix a couple of bad pointer indirections (oops).
...
Lets stick to a single category of "http" for the "user_agent"
context override.
2002-09-07 20:58:30 +00:00
Sterling Hughes
ce686a63de
commit the correct/up-to-date version
2002-09-07 15:55:04 +00:00
Sterling Hughes
91df221ab7
@ Made the User-Agent that php's fopen wrappers send, configurable via
...
@ php.ini or via a stream context. (Sterling)
The stream context is untested, but it should/could work :) Either way it
doesn't make the rest of the code bad. Wez -- please take a looksie for me
:)
2002-09-07 15:45:29 +00:00
Ilia Alshanetsky
3c95ac6b4f
Fixed a massive memory leak that occurs when an opened webpage returns
...
a non 200 return code.
2002-09-07 07:13:43 +00:00
Anantha Kesari H Y
8b8f1e0590
NetWare related additions/modifications
2002-09-05 14:25:07 +00:00
Wez Furlong
3fe62cf0fb
Missing word...
2002-08-11 18:51:40 +00:00
Wez Furlong
bcef712ad6
Properly implement TSRM parameters to the new log_error
...
function... (Thanks Marcus!)
Add a convenience macro for importing a stream from a zval.
2002-08-11 14:29:01 +00:00
Wez Furlong
5a21ab42cb
Introduce an error stack for wrappers, to help prevent multiple errors
...
and warnings (some of which are bogus) when there are problems opening
streams.
Implement sanity check on the mode used to open ftp and http connections.
This fixes Bug 12004.
2002-08-11 10:53:10 +00:00
Jason Greene
a64eceef59
Switch streams socket abstraction to use a timeval structure instead of an
...
integer to allow subsecond timeouts.
This supports the previous behavior of fsockopen()
Fixes bug #16261
2002-07-22 18:46:26 +00:00
foobar
c8f5edec93
Fixed bug: #16637 , username/password needs to be urlencoded.
2002-07-11 02:35:45 +00:00
Sascha Schumann
140158734f
redirected is set but never used
2002-05-04 17:16:28 +00:00
Wez Furlong
501ed6ccb2
Make use of new flag so that we can buffer http headers when we know that
...
the stream is not intended to be used in require/include.
2002-04-30 00:30:00 +00:00
Yasuo Ohgaki
fe6990cc6b
Remove compiler warnings
2002-04-19 07:56:41 +00:00
Wez Furlong
b10b24d50c
Always initialize wrappers, regardless of PG(allow_url_fopen).
...
Add is_url field to wrapper structure; the stream wrapper openers
will disallow opening is is_url && !PG(allow_url_fopen).
Add infrastructure for stat($url) and opendir($url).
Tidy up/centralize code that locates and instantiates wrappers for the
various operations.
Implement opendir for plain files.
Make the PHP opendir and dir functions use the streams implementations.
Add modelines for syntax highlighting the pear scripts in vim
2002-04-16 22:14:27 +00:00
Wez Furlong
e1d0a14790
Implement stream context and status notification system.
...
Bump the BC for zlib notice to a warning
# See my RFC to php-dev a few days ago
2002-04-10 22:42:32 +00:00
Wez Furlong
2539cbc74c
Phase 3 of OO wrapper cleanup
...
# What was phase 2?
2002-03-28 00:49:00 +00:00
Wez Furlong
5ee65bd8f5
Phase 1 of wrapper OO cleanup.
...
# Collecting underpants
2002-03-24 18:05:49 +00:00
Wez Furlong
06712a508a
Implement user-space streams.
...
There's probably room for improvement,
docs will following some time this week.
2002-03-19 03:51:01 +00:00
Wez Furlong
c9d5e13738
TSRMLS related work on streams, as discussed with Zeev.
...
# Should be the last "broad" commit for a while
# Don't forget to make clean ; make
2002-03-18 18:54:32 +00:00
Wez Furlong
d2d8762267
Streams now make more use of the memory manager, so tracking down
...
leaking streams should be easier.
# I hate these big commits
2002-03-17 22:50:59 +00:00
Wez Furlong
a184f5d1d3
* formatting, plus remove some old fopen wrappers
2002-03-16 01:34:52 +00:00
Wez Furlong
0f65280cb5
New PHP streams...
2002-03-15 21:03:08 +00:00
Sebastian Bergmann
90613d2282
Maintain headers.
2002-02-28 08:29:35 +00:00
Alex Waugh
e320de1e2e
Undefine AF_UNIX under RISC OS
2001-12-23 00:46:13 +00:00
Sebastian Bergmann
38933514e1
Update headers.
2001-12-11 15:32:16 +00:00
Edin Kadribasic
c0efc001af
Fixed last argument in strlcat() call.
2001-10-19 18:06:37 +00:00
Edin Kadribasic
86959aaf62
Changed strncpy=>strlcpy; strncat=>strlcat
2001-10-19 15:54:05 +00:00
Edin Kadribasic
96a04d4ab7
Fixed bug #13083 in http_fopen_wrapper.c which is now able to handle
...
non absolute redirects.
2001-10-15 23:30:40 +00:00
Derick Rethans
78747bd2df
- Don't wrap lines... this is annoying while coding.
2001-09-09 13:29:31 +00:00
Zeev Suraski
15cb7ca021
Fix some warnings
2001-07-31 23:32:24 +00:00
Zeev Suraski
b1de7fc900
More TSRMLS_FETCH annihilation. Enough for today...
2001-07-31 07:09:49 +00:00
Zeev Suraski
d87cc976e1
Redesigned thread safety mechanism - nua nua
2001-07-28 11:36:37 +00:00
Zeev Suraski
fe6f8712a4
- Get rid of ELS_*(), and use TSRMLS_*() instead.
...
- Move to the new ts_allocate_id() API
This patch is *bound* to break some files, as I must have had typos somewhere.
If you use any uncommon extension, please try to build it...
2001-07-27 10:16:41 +00:00
Andi Gutmans
fbc8f3f51d
- Faster without calling strlen()
2001-07-14 16:41:58 +00:00
Rasmus Lerdorf
8406c2d682
Fix for bug #11632
2001-07-14 15:08:36 +00:00
Daniel Beulshausen
c6b4e55838
PHPAPIize url function to make them available to the outside (i.e. mbstring)
2001-06-11 15:14:04 +00:00