Commit Graph

79 Commits

Author SHA1 Message Date
Anantha Kesari H Y
474c53348c removed unwanted comments, NEW_LIBC checks and NetWare specific stat structure population 2004-09-29 10:21:41 +00:00
Ilia Alshanetsky
60fc9c050a Fixed bug #29678 (opendir() with ftp:// wrapper segfaults if path does not
have trailing slash).
2004-08-16 01:41:14 +00:00
Sara Golemon
b0f344e493 Oh by the way, only use proxy mode for reading... 2004-07-24 04:14:26 +00:00
Sara Golemon
93f795bb9e Add proxy support to ftp using http wrapper 2004-07-24 04:01:48 +00:00
Sara Golemon
e5ed53b00a Add MTDM support to ftp_fopen_wrapper::url_stat() 2004-07-21 04:37:47 +00:00
Sara Golemon
cceecdbcdb BugFix# 27982: Provide error message when trying to overwrite an existant file without overwrite context option. 2004-05-17 20:31:59 +00:00
Sara Golemon
c603f3112e FTP dirstream_read should not leave whitespace/newlines on dirents 2004-01-28 22:50:12 +00:00
Ard Biesheuvel
6b8c406481 Changed prototypes to allow parsing of string literals and constant strings
Minor CS/WS
2004-01-25 00:30:50 +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
Ilia Alshanetsky
56f046a67a Fixed ZTS build. 2003-12-10 21:23:35 +00:00
Moriyoshi Koizumi
b2cd08f33d Fix bug #26574 (basename() doesn't work properly with multibyte characters) 2003-12-10 07:15:28 +00:00
Sara Golemon
e9a1d12f71 Add in missing stat element and fix win32 build 2003-11-29 20:01:00 +00:00
Sara Golemon
9defdab180 Finish off ftp://'s url_stat support 2003-11-29 17:16:58 +00:00
Sara Golemon
026d4c9e4c Route php_stat() via streams/url_stat API (php_stream_stat_path).
This enables fopen-wrappers support on stat() and related family calls.
2003-11-28 23:25:28 +00:00
Hartmut Holzgraefe
075e66cc08 signed/unsigned compiler warning fixes 2003-09-26 08:09:56 +00:00
Sascha Schumann
6a7dde29e7 kill warnings 2003-08-28 16:28:33 +00:00
Sara Golemon
a76f0dc8ae Bugfix#25239 Closing control stream while data stream is open violates RFC959 section 2.3 2003-08-25 22:25:33 +00:00
Sara Golemon
6f88d49d6c Add resume_pos (resume position) context option for restarting file downloads. 2003-08-20 21:59:29 +00:00
Sara Golemon
1a0bd6e903 Plug leak in ftp_url_stat 2003-08-08 06:18:25 +00:00
Sara Golemon
66881b5f2c Fix compiler warnings 2003-06-18 03:26:29 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Sebastian Bergmann
85a13e3e9a Fix warnings. 2003-05-17 06:21:34 +00:00
Sara Golemon
022a1625a3 Implement unlink() method in ftp wrapper ops and do some general cleanup of other code 2003-05-14 18:02:10 +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
Hartmut Holzgraefe
e6490c4a41 basename() now binary safe, testcases added 2003-05-05 13:46:14 +00:00
Sara Golemon
bb48c7d861 Take STREAMS_CC/STREAMS_DC declarations out of do_connect/do_pasv where they don't need to be. Add minimalist url_stat method to ftp:// wrapper which can at least determine filesize. Other properties set to 0 since the FTP protocol simply doesn't support exploring them. url_stat won't actually work however until ext/standard/filestat.c is patched to allow stat wrappers. 2003-04-26 01:55:31 +00:00
Sara Golemon
2d558127af No idea how that character dissapeared. 2003-04-24 22:25:33 +00:00
Sara Golemon
2fc1d2c330 Fix error handling bug I just introduced (php_ftp_fopen_connect == NULL) and add append support to wrapper 2003-04-24 21:21:41 +00:00
Sara Golemon
228f65f889 Abtract some ftp connection/negotiation steps out and add support for stream_opendir. This allows things like opendir('ftp://ftp.foo.com/path') 2003-04-24 20:32:14 +00:00
Sara Golemon
cb89565ba4 Feature Request #7121.
Allow overwritting of files via ftp:// wrapper.
Requires context option:  $context['ftp']['overwrite'] != 0
2003-04-22 04:13:09 +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
e8823a205a Fixed bug #22402 (opening of ftp for read/write could fail due to invalid
return code handling).
Solution suggested by jan@jancm.org
2003-02-25 04:20:22 +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
Sebastian Bergmann
b506f5c8f8 Bump year. 2002-12-31 16:08:15 +00:00
Stefan Esser
ababfedb66 tmp_line was possible uninitialised, resulting in crap error messages. 2002-11-25 22:53:57 +00:00
Ilia Alshanetsky
693fd4a36b Added a check to determine if the file can be retrieved or sent.
This check also prevents incorrect error reporting in the event the retrieval
or the sending of the file cannot be accomplished.
2002-11-25 22:00:52 +00:00
Ilia Alshanetsky
9cc24bad1e Fixed compile warning when compiling without openssl support. 2002-11-08 03:02:51 +00:00
Marcus Boerger
3bfb7162a8 silence
#when i get this code right tmp_line is not initialised, too.
#Therefore php_stream_wrapper_log_error() will be called with
#undefined value, will it?
2002-11-05 11:17:45 +00:00
Stefan Esser
87c0577a0c some broken ftp servers return 32bit port numbers. 2002-10-04 21:58:39 +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
Derick Rethans
9c6f744649 - Fix ZTS build 2002-09-21 18:25:04 +00:00
Stefan Esser
714eb8069a made new ssl activate function the default. 2002-09-12 21:52:09 +00:00
Stefan Esser
cbf5e3ca06 Added possibility to reuse an old SSL session id.
Ugly but needed for f.e.: debians ftpd-ssl
2002-09-08 22:26:11 +00:00
Shane Caraveo
2c6dca5a6e someone missed code requiring ssl 2002-09-08 20:52:03 +00:00
Stefan Esser
8dbcb26fd0 ftp(s) fopen() wrapper does no longer ignore the ip returned by PASV. 2002-09-08 19:35:42 +00:00