Commit Graph

1690 Commits

Author SHA1 Message Date
Derick Rethans
7592362b4c - Allow the report_memleak setting to be set everywhere 2002-10-24 16:56:59 +00:00
Sascha Schumann
2909e5c9c9 centralize #include "build-defs.h" and drop (sometimes inconsistent) other
instances
2002-10-24 13:15:49 +00:00
Moriyoshi Koizumi
e8be0db546 Fixed build when mbstring is not used - my previous patch is insufficient. 2002-10-24 02:59:01 +00:00
Moriyoshi Koizumi
73ca375f37 MFH; we would see a nasty problem again if it was not fixed... 2002-10-24 02:56:28 +00:00
Moriyoshi Koizumi
74883a9583 Make php_mb_is_mb_leadbyte() obsolete. It only works with double-byte chars.
# Sorry Marcus, it seems we were working simultaneously :)
2002-10-23 23:25:27 +00:00
Moriyoshi Koizumi
afa9f42f47 Function renaming. 2002-10-23 19:51:50 +00:00
Moriyoshi Koizumi
fdc91ccc73 Renaming the functions. 2002-10-23 18:32:55 +00:00
Moriyoshi Koizumi
b7703551ed Remaned the functions for consistency 2002-10-23 16:54:31 +00:00
Derick Rethans
d54f58d164 - Trying to clean up this mess :) 2002-10-23 09:35:21 +00:00
Derick Rethans
273d5e04d2 - No reason why implicit_flush should not be settable from a script 2002-10-23 09:31:33 +00:00
Ilia Alshanetsky
a5d3427251 When doing automatic line end detection, pick the line end that is found
first.
2002-10-22 15:34:50 +00:00
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