1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 19:23:22 +02:00
Commit Graph

1679 Commits

Author SHA1 Message Date
Wez Furlong dabf1053cd Refine stream_select() to work with streams that have data in their read
buffers.
When selecting for read, the streams are examined; if any of them have
pending read data, no actual select(2) call is performed; instead the
streams with buffered data are returned; just like a regular select
call.
Prevent erroneous warning in stream_select when obtaining the fd.
2002-10-21 22:54:37 +00:00
Hartmut Holzgraefe 07b90cafc9 removed left-over unused variable 2002-10-21 19:18:39 +00:00
Hartmut Holzgraefe 8841dfc995 removed bogus paranoid header checking 2002-10-21 18:44:50 +00:00
Hartmut Holzgraefe 8b7e9d7774 some changes to how request input data (Content-Lenght >0) is handled
- webdav-specific stuff removed (should be handled using httpd.conf
  LIMIT or equivalents)
- always_populate_raw_post_data now working on any method, not just
  POST (and webdav methods with allow_webdav_methods), when
	Content-Length is greater zero
- raw input data is also available using php://input stream,
  this way one doesn't have to care about memory_limit
- input data is now always consumed (although maybe ignored,
  this fixes we had withproblems with keep-alive connections
@ raw POST data is now available as php://input stream (hartmut)
2002-10-21 16:41:06 +00:00
Ilia Alshanetsky b9efd22339 Fixed bug #16880. Added an ini option max_input_time that allows the user
to specify how much time a script may spend parsing input data (POST, GET, etc..).
2002-10-21 13:09:29 +00:00
Moriyoshi Koizumi 890aee56d1 MFH 2002-10-21 01:33:31 +00:00
Moriyoshi Koizumi c536b52cb0 style fix 2002-10-20 23:05:34 +00:00
Ilia Alshanetsky fef922307c Fixed incorrect handling of files starting with a . 2002-10-20 20:44:10 +00:00
Masaki Fujimoto a6ecdca0ef fixed highlight related bugs (in case shift_jis input/output filters are enabled) 2002-10-20 02:57:40 +00:00
Ilia Alshanetsky ec400b8d16 Silence compile warning, when compiling --with-openssl. 2002-10-19 17:05:08 +00:00
Ilia Alshanetsky 8ca0b28b6a Fixed a typo. 2002-10-19 16:50:07 +00:00
Wez Furlong 829f1855fd made fgets() binary safe.
php_stream_gets is now a macro which calls php_stream_get_line. The latter
has an option argument to return the number of bytes in the line.
Functions like fgetcsv(), fgetss() can be made binary safe by calling
php_stream_get_line directly.

# HEADS UP: You will need to make clean after updating your CVS, as the
# binary signature has changed.
2002-10-19 13:11:48 +00:00
Wez Furlong f42b26bc22 Probable fix for #19944 2002-10-19 10:34:10 +00:00
Ilia Alshanetsky 4b83b189fe Fixed bug #19971 (optimized the file() function).
The file() function is now also binary safe.
2002-10-18 20:39:49 +00:00
Wez Furlong 7de1f45aaa Revert my last bogus commit.
Change the comparison to something that is less likely to inspire me to
make the same mistake again...
2002-10-18 17:14:32 +00:00
Wez Furlong e0c0264935 Improve EOF detection. Fixes #19970. 2002-10-18 12:15:04 +00:00
Ilia Alshanetsky 5ce6d653b8 Fixed bug #19921. (memory leak introduced by me in rev 1.492) 2002-10-16 16:52:08 +00:00
Sebastian Bergmann 9f158fc9c0 Revert. Again. 2002-10-16 14:53:34 +00:00
Sebastian Bergmann 49e106d3d3 Patch by Urs Gehrig <urs@circle.ch>. 2002-10-16 07:37:28 +00:00
Wez Furlong 2f6952c936 Nope, that last one wasn't a leak in main/streams.c, it was
file_get_contents misinterpreting the result...
2002-10-15 16:45:26 +00:00
Wez Furlong fa1f06b69f Fix mem leak for zero-byte files. 2002-10-15 16:38:11 +00:00
Wez Furlong 842b5554e0 Some buffer paranoia.
Also, make feof() detection safer (ala recent changes to zlib extension).
2002-10-15 16:04:46 +00:00
Ilia Alshanetsky bf51192d67 Fixed possible memory leaks. 2002-10-15 02:05:27 +00:00
Wez Furlong 6890f98e70 Fix leak, and avoid initialization problems where retval is re-used
within a function.
2002-10-15 01:57:19 +00:00
Sebastian Bergmann 64a22c8a3e Revert to 1.34. 2002-10-14 16:14:18 +00:00
Sebastian Bergmann 276b314ed3 Whitespace fixes. 2002-10-14 05:56:03 +00:00
Sebastian Bergmann 2e68e0beba Fix Win32 build. 2002-10-14 05:54:15 +00:00
Wez Furlong 106631fce1 *cough*
Fix inverted logic for the assert.
2002-10-14 05:38:50 +00:00
Wez Furlong 86e60a2d7a @- fgets($fp) (with no length parameter) now uses a buffer as long as the
@  the next line available from the $fp. Previously, there was a 1KB limit.
@  (Wez)
2002-10-14 02:28:35 +00:00
Wez Furlong be5606504c Implement better SSL error handling. 2002-10-14 01:27:43 +00:00
Wez Furlong 483f355d30 Fix stream_eof result interpretation (and thus the user-streams test). 2002-10-14 00:16:02 +00:00
Wez Furlong 2d97f4d4c7 Remove some old code. 2002-10-13 23:43:46 +00:00
Wez Furlong 0bcd2ccb2c A much better probable fix for #16114. 2002-10-13 23:43:21 +00:00
Wez Furlong bc0948bbda Probable fix for #16114 2002-10-13 23:21:05 +00:00
Wez Furlong 5f7c347f17 Fix a nasty nasty bug:
When not enough data to satisfy a read was found in the buffer, fgets modifies
the buf pointer to point to the position to store the next chunk.  It then
returned the modified buf pointer, instead of a pointer to the start of the
buffer.

Also added some infrastructure for making fgets grow the buffer on-demand to
the correct line-size.  Since streams uses reasonable chunk sizes, the
performance of the realloc's should be pretty good; in the best case, the line
is already found completely in the buffer, so the returned buffer will be
allocated to precisely the correct size.

In the worst case, where the buffer only contains part of the line, we get a
realloc per buffer fill. The reallocs are either the size of the remainder
of the line, or the chunk_size (if the buffer sill does not contain a complete
line).  Each realloc adds an extra byte for a NUL terminator.

I think this will perform quite well using the default chunk size of 8K.
2002-10-13 22:52:33 +00:00
Wez Furlong 70b796b143 (php_socket_errno) win32 errno compatible macro.
(php_socket_strerror) win32 compatible strerror replacement.
Add an E_NOTICE when a socket write fails.
2002-10-13 22:01:40 +00:00
Shane Caraveo 96b9c0a523 make php_import_environment_variables overwritable so fastcgi can correctly
set $_ENV.
2002-10-13 08:38:09 +00:00
Wez Furlong 4308a399b9 paranoia 2002-10-12 02:56:34 +00:00
Wez Furlong 258aa4d239 Write in blocks of the current chunk_size for a stream.
Should resolve problems with network writes.
2002-10-12 02:31:42 +00:00
Edin Kadribasic 9f4abb7ae4 Revert Stig's patch. Windows build should work again. 2002-10-11 09:20:38 +00:00
Sebastian Bergmann 5f56185a62 Break it again (after 4.3.0-pre1 :-) 2002-10-10 19:08:13 +00:00
Andrei Zmievski 3b32aa7d33 Back to 4.3.0-dev. 2002-10-10 19:07:12 +00:00
Sebastian Bergmann f2155df039 Revert to revision 1.13 for 4.3.0-pre1. 2002-10-10 17:45:36 +00:00
Andrei Zmievski bb4aefacd0 Update to 4.3.0-pre1. 2002-10-10 17:34:12 +00:00
foobar 8f92778136 revert version here too.. 2002-10-08 19:44:04 +00:00
Stig Bakken 231efd186f * make these variables configurable from environment on Windows:
PEAR_INSTALLDIR           PHP_BINDIR      PHP_CONFIG_FILE_PATH
  PHP_CONFIG_FILE_SCAN_DIR  PHP_DATADIR     PHP_EXTENSION_DIR
  PHP_INCLUDE_PATH          PHP_LIBDIR      PHP_LOCALSTATEDIR
  PHP_PREFIX                PHP_SYSCONFDIR
2002-10-08 01:04:52 +00:00
Stefan Esser 46f4a07d1c Closing protected variables hole 2002-10-07 11:23:24 +00:00
Zeev Suraski 1143a7023c Whitespace 2002-10-07 11:21:06 +00:00
Sascha Schumann 88b2d8bb8f stdio buffers data in user land. By calling fflush(3), this
data is sent to the kernel using write(2). fsync'ing a
file descriptor is not required -- writing to a fd has the same
affect as calling fflush after each fwrite.
2002-10-07 03:12:06 +00:00
Wez Furlong 510f3b0305 Try to ensure that we return the number of bytes requested during fread(). 2002-10-06 23:27:53 +00:00