php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28015 HTTP POST file uploads do not give error when canceled
Submitted: 2004-04-15 20:09 UTC Modified: 2005-01-10 15:18 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: kevin_winahradsky at hotmail dot com Assigned:
Status: Not a bug Package: HTTP related
PHP Version: 5.0.0RC1 OS: Linux 2.4.18
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: kevin_winahradsky at hotmail dot com
New email:
PHP Version: OS:

 

 [2004-04-15 20:09 UTC] kevin_winahradsky at hotmail dot com
Description:
------------
When doing an HTTP POST upload of a file, if the upload is canceled by closing the browser, $_FILES['userfile']['error'] will be equal to UPLOAD_ERR_OK.

Reproduce code:
---------------
<html> <head> </head>
<body>

<p>
<?php
if (isset($_FILES['userfile'])) {
    error_log("error = " . $_FILES['userfile']['error']);
    error_log("size = " . $_FILES['userfile']['size']);
    print("<br>" . $_FILES['userfile']['error']);
    error_log("completed!");
}
?>
</p>

<p><form enctype="multipart/form-data" action="fileuploadtest.php" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="50000000">
<input name='userfile' type="file" size="30">
<br> <input type="submit">
</form></p>

</body></html>


Expected result:
----------------
I would expect $_FILES['userfile']['error'] to be set to UPLOAD_ERR_PARTIAL.

Actual result:
--------------
$_FILES['userfile']['error'] is set to UPLOAD_ERR_OK.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-07 11:48 UTC] pieter at frenssen dot be
This also happens in PHP 4.3.x, but the bug report has been closed. Check bug #19556.
 [2005-01-10 15:18 UTC] sniper@php.net
See bug #19556

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC