Bug #10487 Updated: Uploaded files get prepended with 'Content-Type: ...' string

From: Date: Wed, 25 Apr 2001 16:27:44 +0000
Subject: Bug #10487 Updated: Uploaded files get prepended with 'Content-Type: ...' string
Groups: php.dev 
Request: Send a blank email to php-dev+get-52395@lists.php.net to get a copy of this message
ID: 10487 Updated by: rasmus Reported By: t@nymand.dk Status: Closed Bug Type: HTTP related PHP Version: 4.0.4pl1 Assigned To: Comments: Fixed in CVS - will be in 4.0.5 Previous Comments: --------------------------------------------------------------------------- [2001-04-25 12:26:10] rasmus@php.net This has been fixed in CVS and will be part of 4.0.5 See bug #9298 --------------------------------------------------------------------------- [2001-04-25 05:28:53] t@nymand.dk <HTML> <BODY> <?php define(MAX_SIZE, 1000000); define(UPLOAD, 0); define(SUBMIT, 1); function upload() { global $PHP_SELF; printf ("<form method="post" ENCTYPE="multipart/form-data" action="%s?action=%d&person_id=%d">n", $PHP_SELF,SUBMIT,$person_id); print ("File:<BR> <INPUT TYPE=FILE NAME="pictfile" SIZE=50><BR>"); print ("<input type="submit" name="button">n"); printf ("</form>n"); } function submit($file) { $fd=fopen($file,"r") or die ("Unable to open uploaded file!"); $data=fread($fd, MAX_SIZE); fclose($fd); unlink($file); echo "Beginning of file: ".substr($data, 0, 25); } if (empty($action)) $action = UPLOAD; switch ($action) { case UPLOAD: upload(); break; case SUBMIT: submit($pictfile); break; default: die ("Unknown action code ($action)"); } ?> </body> </html> --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=10487&edit=2

« previous php.dev (#52395) next »