Bug #53548 [NEW]: post failled when '@' is the first character
| From: | wangyi6854 at sohu dot com | Date: | Wed, 15 Dec 2010 08:05:00 +0000 |
| Subject: | Bug #53548 [NEW]: post failled when '@' is the first character | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-157007@lists.php.net to get a copy of this message | ||
From:
Operating system: FreeBSD 8.1
PHP version: 5.3.4
Package: cURL related
Bug Type: Bug
Bug description:post failled when '@' is the first character
Description:
------------
curl post will failed when post field's first char is '@'.
the ip address in the following code is www.example.com's. You can replace
it with any address.
Test script:
---------------
<?php
$msg = '';
if ( !empty( $_POST ) ) {
$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, "http://192.0.32.10/" );
curl_setopt( $ch, CURLOPT_POST, 1 );
curl_setopt( $ch, CURLOPT_POSTFIELDS, array( 'test' => '@aaaa' ) );
if ( false === curl_exec( $ch ) ) {
$msg .= 'curl error: ' . curl_errno( $ch ) . ".\nmessage: " . curl_error(
$ch ) . PHP_EOL;
}
else {
$msg .= 'OK!';
}
curl_close( $ch );
}
?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head></head>
<body>
<pre><?php echo $msg; ?></pre>
<form method="post" action="">
<input type="submit" name="test" value="test!" />
</form>
</body></html>
Expected result:
----------------
curl should work whatever the content is.
Actual result:
--------------
curl will failed when post field's first char is '@'.
--
Edit bug report at http://bugs.php.net/bug.php?id=53548&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53548&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53548&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53548&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=53548&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53548&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=53548&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=53548&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=53548&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=53548&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=53548&r=support
Expected behavior: http://bugs.php.net/fix.php?id=53548&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=53548&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=53548&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=53548&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53548&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=53548&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=53548&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=53548&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=53548&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=53548&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=53548&r=mysqlcfg