[PHP4BETA] CVS update: php4/ext/standard
| From: | andi | Date: | Sun, 09 May 1999 18:40:59 +0000 |
| Subject: | [PHP4BETA] CVS update: php4/ext/standard | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-732@lists.php.net to get a copy of this message | ||
Date: Sunday May 9, 1999 @ 14:40
Author: andi
Update of /repository/php4/ext/standard
In directory php:/tmp/cvs-serv14456/ext/standard
Modified Files:
basic_functions.c post.c
Log Message:
* Make read_post() read input by chunks instead of returning a single string.
This will allow us to efficiently support file upload through SAPI in the future.
* Fixes
Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.15 php4/ext/standard/basic_functions.c:1.16
--- php4/ext/standard/basic_functions.c:1.15 Sun May 9 09:55:15 1999
+++ php4/ext/standard/basic_functions.c Sun May 9 14:40:59 1999
@@ -1809,11 +1809,11 @@
ZEND_API void php_get_highlight_struct(zend_syntax_highlighter_ini *syntax_highlighter_ini)
{
- syntax_highlighter_ini->highlight_comment = INI_STR("highlight_comment");
- syntax_highlighter_ini->highlight_default = INI_STR("highlight_default");
- syntax_highlighter_ini->highlight_html = INI_STR("highlight_html");
- syntax_highlighter_ini->highlight_keyword = INI_STR("highlight_keyword");
- syntax_highlighter_ini->highlight_string = INI_STR("highlight_string");
+ syntax_highlighter_ini->highlight_comment = INI_STR("highlight.comment");
+ syntax_highlighter_ini->highlight_default = INI_STR("highlight.default");
+ syntax_highlighter_ini->highlight_html = INI_STR("highlight.html");
+ syntax_highlighter_ini->highlight_keyword = INI_STR("highlight.keyword");
+ syntax_highlighter_ini->highlight_string = INI_STR("highlight.string");
}
Index: php4/ext/standard/post.c
diff -u php4/ext/standard/post.c:1.9 php4/ext/standard/post.c:1.10
--- php4/ext/standard/post.c:1.9 Sun May 9 09:57:09 1999
+++ php4/ext/standard/post.c Sun May 9 14:40:59 1999
@@ -320,6 +320,7 @@
{
char *res = NULL, *var, *val;
pval *array_ptr;
+ int free_buffer;
ELS_FETCH();
PLS_FETCH();
SLS_FETCH();
@@ -353,20 +354,28 @@
break;
}
- if (arg == PARSE_POST) {
+ if (arg == PARSE_POST) { /* POST data */
res = php3_getpost(array_ptr PLS_CC);
- } else if (arg == PARSE_GET) { /* Get data */
+ free_buffer = 0;
+ } else if (arg == PARSE_GET) { /* GET data */
var = SG(request_info).query_string;
if (var && *var) {
res = (char *) estrdup(var);
+ free_buffer = 1;
+ } else {
+ free_buffer = 0;
}
} else if (arg == PARSE_COOKIE) { /* Cookie data */
var = SG(request_info).cookie_data;
if (var && *var) {
res = (char *) estrdup(var);
+ free_buffer = 1;
+ } else {
+ free_buffer = 0;
}
} else if (arg == PARSE_STRING) { /* String data */
res = str;
+ free_buffer = 1;
}
if (!res) {
return;
@@ -396,8 +405,10 @@
} else {
var = strtok(NULL, PG(arg_separator));
}
+ }
+ if (free_buffer) {
+ efree(res);
}
- efree(res);
}
--
PHP 4 Beta