php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64584 Content-length is correct, but data truncated in php://input
Submitted: 2013-04-04 17:12 UTC Modified: 2013-04-05 01:17 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: viraj dot kanwade at snstech dot com Assigned:
Status: Not a bug Package: HTTP related
PHP Version: 5.3.23 OS: Centos
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: viraj dot kanwade at snstech dot com
New email:
PHP Version: OS:

 

 [2013-04-04 17:12 UTC] viraj dot kanwade at snstech dot com
Description:
------------
We use PHP 5.3.14

Sometimes ajax post to a PHP page, results in $_SERVER content-length to be set 
correctly, but the $_POST does not have all data. I have also tested php://input 
to see if the data was received. But the data was truncated. This is NOT a file 
upload.

The data could be of 1000-5000 chars. But only 400-600 chars are received.

This is intermittent.

Could be similar to https://bugs.php.net/bug.php?id=22427

Expected result:
----------------
The post values submitted by ajax request should be available in $_POST.

Actual result:
--------------
The post value is truncated.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-04-05 01:17 UTC] rasmus@php.net
-Status: Open +Status: Not a bug
 [2013-04-05 01:17 UTC] rasmus@php.net
$_SERVER['Content-Length'] is set by the web server and tends to come directly 
from the Content-Length header the client sends. If the client aborts before 
sending all the data the web server is not going to adjust this value. This is 
quite normal. You can check the connection status to see if the client aborted 
mid-request on you. See http://php.net/manual/en/features.connection-handling.php
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC