-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed bug with mixed case boundaries
- Loading branch information
Showing
4 changed files
with
118 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,9 +24,9 @@ This extension does not provide any INI entries, constants, functions or classes | |
<email>[email protected]</email> | ||
<active>yes</active> | ||
</lead> | ||
<date>2015-03-18</date> | ||
<date>2015-04-24</date> | ||
<version> | ||
<release>1.0.0</release> | ||
<release>1.0.1</release> | ||
<api>1.0.0</api> | ||
</version> | ||
<stability> | ||
|
@@ -35,7 +35,7 @@ This extension does not provide any INI entries, constants, functions or classes | |
</stability> | ||
<license>BSD, revised</license> | ||
<notes><![CDATA[ | ||
* Split off pecl_http | ||
* Fix bug where non-POST payloads with mixed case boundaries would not be parsed | ||
]]></notes> | ||
<contents> | ||
<dir name="/"> | ||
|
@@ -50,6 +50,7 @@ This extension does not provide any INI entries, constants, functions or classes | |
<dir name="tests"> | ||
<file role="test" name="001.phpt"/> | ||
<file role="test" name="002.phpt"/> | ||
<file role="test" name="003.phpt"/> | ||
</dir> | ||
</dir> | ||
</contents> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
--TEST-- | ||
apfd - mixed case boundary | ||
--SKIPIF-- | ||
<?php | ||
extension_loaded("apfd") or die("skip need apfd support\n"); | ||
?> | ||
--PUT-- | ||
Content-Type: multipart/form-data; boundary=----------------------------abcDEFG123 | ||
------------------------------abcDEFG123 | ||
Content-Disposition: form-data; name="LICENSE"; filename="LICENSE" | ||
Content-Type: application/octet-stream | ||
|
||
Copyright (c) 2011-2012, Michael Wallner <[email protected]>. | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright notice, | ||
this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
|
||
------------------------------abcDEFG123 | ||
Content-Disposition: form-data; name="composer"; filename="composer.json" | ||
Content-Type: application/octet-stream | ||
|
||
{ | ||
"name": "m6w6/autocracy", | ||
"type": "library", | ||
"description": "http\\Controller preserves your autocracy", | ||
"keywords": ["http", "controller", "pecl", "pecl_http"], | ||
"homepage": "http://github.com/m6w6/autocracy", | ||
"license": "BSD-2", | ||
"authors": [ | ||
{ | ||
"name": "Michael Wallner", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"require": { | ||
"php": ">=5.4.0", | ||
"pecl/pecl_http": "2.*" | ||
}, | ||
"autoload": { | ||
"psr-0": { | ||
"http\\Controller": "lib" | ||
} | ||
} | ||
} | ||
|
||
------------------------------abcDEFG123 | ||
Content-Disposition: form-data; name="user" | ||
|
||
mike | ||
------------------------------abcDEFG123-- | ||
--FILE-- | ||
<?php | ||
|
||
var_dump($_POST, $_FILES); | ||
|
||
?> | ||
--EXPECTF-- | ||
array(1) { | ||
["user"]=> | ||
string(4) "mike" | ||
} | ||
array(2) { | ||
["LICENSE"]=> | ||
array(5) { | ||
["name"]=> | ||
string(7) "LICENSE" | ||
["type"]=> | ||
string(24) "application/octet-stream" | ||
["tmp_name"]=> | ||
string(%d) "%sphp%s" | ||
["error"]=> | ||
int(0) | ||
["size"]=> | ||
int(1340) | ||
} | ||
["composer"]=> | ||
array(5) { | ||
["name"]=> | ||
string(13) "composer.json" | ||
["type"]=> | ||
string(24) "application/octet-stream" | ||
["tmp_name"]=> | ||
string(%d) "%sphp%s" | ||
["error"]=> | ||
int(0) | ||
["size"]=> | ||
int(550) | ||
} | ||
} |