Re: POST and multipart/form-data

From: Date: Sun, 21 Nov 1999 17:20:09 +0000
Subject: Re: POST and multipart/form-data
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-12866@lists.php.net to get a copy of this message
On Sun, Nov 21, 1999 at 11:42:23AM -0500, Rasmus Lerdorf wrote: > > Has anyone looked at #2739? There seems to be an off by 1 > > error with regard to setting variable names. I.e., > > > > <form method="POST" enctype="multipart/form-data"> > > <input type=text name=variable> > > </form> > > > > will cause $variabl to be set. functions/post.c has not been > > changed for ages, so there must have been a recent change > > somewhere else which broke this. > > Hrm.. I bet this change did that: > > > http://cvs.php.net/cvsweb.cgi/functions/mime.c.diff?r1=1.57&r2=1.58&f=h > > That change was made by kk to address bug #2362 > > Looks like it wasn't thought all the way through. Hm, should not s point at the first character after the variable name? multipart/form-data works fine for me with this change: Index: mime.c =================================================================== RCS file: /repository/php3/functions/mime.c,v retrieving revision 1.58 diff -u -r1.58 mime.c --- mime.c 1999/11/09 13:06:50 1.58 +++ mime.c 1999/11/21 17:18:12 @@ -107,7 +107,6 @@ php3_error(E_WARNING, "File Upload Mime headers garbled [%c%c%c%c%c]", *name, *(name + 1), *(name + 2), *(name + 3), *(name + 4)); SAFE_RETURN; } - s--; if (namebuf) { efree(namebuf); } -- Regards, Sascha Schumann Consultant

« previous php.dev (#12866) next »