Skip to content

Commit a3347f7

Browse files
committed
Minor code cleanup #441
Also add credit to John Whish for URL-encoded form data.
1 parent e6ec36d commit a3347f7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

framework/one.cfc

+3-1
Original file line numberDiff line numberDiff line change
@@ -2773,6 +2773,8 @@ component {
27732773
if ( variables.framework.enableJSONPOST ) {
27742774
// thanks to Adam Tuttle and by proxy Jason Dean and Ray Camden for the
27752775
// seed of this code, inspired by Taffy's basic deserialization
2776+
// also thanks to John Whish for the URL-encoded form support
2777+
// which adds support for PUT etc
27762778
var body = httpData.content;
27772779
if ( isBinary( body ) ) body = charSetEncode( body, "utf-8" );
27782780
if ( len( body ) ) {
@@ -2790,7 +2792,7 @@ component {
27902792
case "application/x-www-form-urlencoded":
27912793
try {
27922794
var paramPairs = listToArray( body, "&" );
2793-
for (var pair in paramPairs) {
2795+
for ( var pair in paramPairs ) {
27942796
var parts = listToArray( pair, "=", true ); // handle blank values
27952797
request.context[ parts[ 1 ] ] = urlDecode( parts[ 2 ] );
27962798
}

0 commit comments

Comments
 (0)