From:             miles at milespawski dot com
Operating system: windows xp
PHP version:      5.2.0
PHP Bug Type:     Apache2 related
Bug description:  POST improper handling of application/x-www-form-urlencode

Description:
------------
When sending POST data by xmlhttp-ajax method from jscript client to 2.2.3
apache server (PHP receipt container), the spaces in the data are not
converted to "+" signs as they are supposed to be with MIME type
application/x-www-form-urlencode.  It worked before with older PHP and
Apache.  Apache.org sent me over here.
I can get around this by doing a php str_replace(" ","+") to the data.

Reproduce code:
---------------
for the record:
client (partial)- 
======
var ops = "data_container.php?file="+ filenm + "&user=" +   
  user + "&sid="+Math.random() 
xmlhttp=new ActiveXObject('Microsoft.XMLHTTP');
xmlhttp.onreadystatechange=loadSizes;
xmlhttp.open('POST', ops, false);
xmlhttp.setRequestHeader("Content-Type", 
  "application/x-www-form-urlencoded")
xmlhttp.send("xx__val=" + Base64data);

Server-
<?php
$file = $_GET['file'];
$user = $_GET['user'];
echo "<form name='form1' method='post' action=''   
   enctype='multipart/form-data' target='_blank'>";
$pre_contents = $_POST['xx__val'];
 



-- 
Edit bug report at http://bugs.php.net/?id=39837&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=39837&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=39837&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=39837&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=39837&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=39837&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=39837&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=39837&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=39837&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=39837&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=39837&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=39837&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=39837&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=39837&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=39837&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=39837&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=39837&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=39837&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=39837&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=39837&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=39837&r=mysqlcfg

Reply via email to