|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10487 Uploaded files get prepended with 'Content-Type: ...' string
Submitted: 2001-04-25 05:28 UTC Modified: 2001-04-25 12:27 UTC
From: t at nymand dot dk Assigned:
Status: Closed Package: HTTP related
PHP Version: 4.0.4pl1 OS: Linux RedHat 7.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: t at nymand dot dk
New email:
PHP Version: OS:


 [2001-04-25 05:28 UTC] t at nymand dot dk

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",
        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);
        echo "Beginning of file: ".substr($data, 0, 25);
if (empty($action))
        $action = UPLOAD;
switch ($action) {
case UPLOAD:
case SUBMIT:
        die ("Unknown action code ($action)");


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-25 12:26 UTC]
This has been fixed in CVS and will be part of 4.0.5
See bug #9298
 [2001-04-25 12:27 UTC]
Fixed in CVS - will be in 4.0.5
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue May 11 01:01:23 2021 UTC