Date: 04/12/00
- Next message: linux <email protected>: "[PHP-DEV] Bug #4117: form \ method="post" error"
- Previous message: alexphpbug <email protected>: "[PHP-DEV] PHP 4.0 Bug #4116: array_walk allows userdata to be passed by ref but only half works"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
askalski Wed Apr 12 12:53:13 2000 EDT
Modified files:
/php3/functions post.c
Log:
if content-type missing from http post, store the raw data in
HTTP_RAW_POST_DATA. previously, the raw data was stored only
when a content-type was given, but was unrecognized.
Index: php3/functions/post.c
diff -u php3/functions/post.c:1.126 php3/functions/post.c:1.127
--- php3/functions/post.c:1.126 Fri Dec 31 20:31:16 1999
+++ php3/functions/post.c Wed Apr 12 12:52:43 2000
@@ -136,27 +136,28 @@
#endif
int length, cnt;
int file_upload = 0;
- int unknown_content_type = 0;
+ int unknown_content_type = 1;
char *mb;
char boundary[100];
TLS_VARS;
ctype = GLOBAL(request_info).content_type;
if (!ctype) {
- php3_error(E_WARNING, "POST Error: content-type missing");
- return NULL;
+ php3_error(E_NOTICE, "POST Error: content-type missing");
}
- if (strncasecmp(ctype, "application/x-www-form-urlencoded", 33) && strncasecmp(ctype, "multipart/form-data", 19)
+ else if (strncasecmp(ctype, "application/x-www-form-urlencoded", 33) && strncasecmp(ctype, "multipart/form-data", 19)
#if HAVE_FDFLIB
&& strncasecmp(ctype, "application/vnd.fdf", 19)
#endif
) {
php3_error(E_NOTICE, "Unknown POST content-type: %s", ctype);
- unknown_content_type = 1;
+ }
+ else {
+ unknown_content_type = 0;
}
/* if this is a POST file upload, figure out the boundary */
- if (!strncasecmp(ctype, "multipart/form-data", 19)) {
+ if (ctype && !strncasecmp(ctype, "multipart/form-data", 19)) {
file_upload = 1;
mb = strchr(ctype, '=');
if (mb) {
@@ -226,7 +227,7 @@
buf[cnt] = '\0';
#if HAVE_FDFLIB
- if (!strncasecmp(ctype, "application/vnd.fdf", 19)) {
+ if (ctype && !strncasecmp(ctype, "application/vnd.fdf", 19)) {
pval postdata, *postdata_ptr;
postdata_ptr = &postdata;
postdata_ptr->type = IS_STRING;
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: linux <email protected>: "[PHP-DEV] Bug #4117: form \ method="post" error"
- Previous message: alexphpbug <email protected>: "[PHP-DEV] PHP 4.0 Bug #4116: array_walk allows userdata to be passed by ref but only half works"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

