https://issues.apache.org/bugzilla/show_bug.cgi?id=47895

           Summary: Incorrect 413 error handling
           Product: Apache httpd-2
           Version: 2.2.11
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: Core
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Apache incorrectly sends the file content after sending 413 error message, for
example:

POST /robots.txt HTTP/1.0
Content-Length: -75000000

HTTP/1.1 413 Request Entity Too Large
Date: Thu, 24 Sep 2009 10:42:30 GMT
Server: Apache/2.2.11 (Unix)
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>413 Request Entity Too Large</title>
</head><body>
<h1>Request Entity Too Large</h1>
The requested resource<br />/robots.txt<br />
does not allow request data with POST requests, or the amount of data provided
in
the request exceeds the capacity limit.
</body></html>
User-agent: *
Disallow: /d2/
Crawl-delay: 1

Apache should close the connection after sending </html> but it doesn't.

It's a big problem when PHP scripts are requested with a wrong Content-Length
because the source code is sent to a client after the error message:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>413 Request Entity Too Large</title>
</head><body>
<h1>Request Entity Too Large</h1>
The requested resource<br />/test.php<br />
does not allow request data with POST requests, or the amount of data
provided in
the request exceeds the capacity limit.
</body></html>
<?php
$dblogin = 'admin';
$dbpass = 'secret';
mysql_connect('localhost', $dblogin, $dbpass);
echo 'some output';
?>

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to