php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15912 thttpd: Trailing \r\n in last varible when doing POST request with IE
Submitted: 2002-03-06 14:37 UTC Modified: 2002-10-12 09:43 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: napolium at sudac dot org Assigned:
Status: Closed Package: Other web server
PHP Version: 4.0CVS-2002-03-0 OS: Linux
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: napolium at sudac dot org
New email:
PHP Version: OS:

 

 [2002-03-06 14:37 UTC] napolium at sudac dot org
I seams like PHP does not care about the Content-length sent by the browser when decoding POST requests. And IE seams to add a trailing \r\n at the end of the POST string that is not included in the Content-length.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-07 07:00 UTC] napolium at sudac dot org
I seams like PHP does not care about the Content-length sent by the
browser when decoding POST requests. And IE seams to add a trailing \r\n
at the end of the POST string that is not included in the
Content-length.


Exmaple code:
<html>
<?php
    echo "a=".urlencode($_POST["a"])."<br>";
    echo "b=".urlencode($_POST["b"])."<br>";
?>
<form action="test2.php" method="post">
a:<input type="text" name="a"><br>
b:<input type="text" name="b"><br>
<input type="submit">
</form>
</html>

Posting "foo" in a and "bar" i b results in this output in IE:
a=foo
b=bar%0D%0A

and in Mozilla:
a=foo
b=bar
 [2002-03-07 09:36 UTC] napolium at sudac dot org
Changed category to HTTP related
 [2002-03-07 09:40 UTC] napolium at sudac dot org
PHP 4.1.2 seams to handle it correctly
 [2002-03-07 14:29 UTC] sniper@php.net
In what version it didn't work?

 [2002-03-07 17:21 UTC] napolium at sudac dot org
The CVS version from yesterday (2002-03-06)
 [2002-03-27 13:33 UTC] napolium at sudac dot org
Tried the CVS version of today (20002-03-27) and the bug is still there. But I think it only happens when useing thttpd as SAPI. There is some code in sapi/thttpd/thttpd.c around line 195 that is suppose to fixit.
 [2002-04-04 07:22 UTC] sniper@php.net
So this was thttpd specific? Reclassified.

 [2002-04-04 07:22 UTC] sniper@php.net
updated subject.

 [2002-10-03 22:50 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


 [2002-10-12 09:41 UTC] napolium at sudac dot org
It seams to work now, thanks!

I have lost the password for this bug :(
 [2002-10-12 09:42 UTC] tal@php.net
Closing.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 06:01:32 2024 UTC